I have result php page with a html table. Inside row[3] i have spoilers. if i click on a text value i can see hidden content.
Inside hidden content i have links on different lines
To make this:
– I insert text inside mysql textarea, so:

– Then I add javascript code in <head>section
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$(".spoiler-label").click(function() {
$(this).parent().find(".spoiler-content").toggle();
});
});
</script>
– and then php code:
echo '<td><span class="spoiler-label">'.$row[1].'</span><div class="spoiler-content" style="display: none"><br><a href='.$row[3].'<a/></div><td>';
– To break the text in new lines i use this php code:
$row['3']=stripslashes($row['3']);
$row['3']=str_replace('<br />',"newline",$row['3']);
$row['3']=htmlentities($row['3']);
$row['3']=str_replace('newline',"<br>",$row['3'])
i obtain this final result:

but you can see the problems:
– formatting is missing because the <th> of row X is black and not orange
– the links inside the spoiler are 2 but are treated as if they are one link.
– i have not correctly link because google.com is http://google.com<br WHY?
You can see 2 links:
http://alfa.com
http://google.com
but if i click over http://alfa.com the link is always http://google.com<br
I want:
-remove <br from link
-separate one link into different links (alfa.com & google.com)
-repair incorrect row formatting
This is my page complete code http://pastebin.com/zb22VqwD and this css http://pastebin.com/dFRFURGM
first off, your 1 line php code echo is wrong (u didnt close
<a>). The css didnt work because of this.(i removed the first echo)
second, an
<a>tag cannot have another<a>tag inside it, so you should just remove the whole<a>from your code above, meaning it should be:then, when instead of for some reason changing ur correct
<br/>‘s into the old version<br>tag, use the tag to create an array:and then echo
$strinto the row,Your code should be: