echoninja Posted April 13, 2006 Share Posted April 13, 2006 Ok at the moment I have a list of entries for articles, I want a quick preview when the person hovers over the link, this is the code I have at the moment[code]$str=$a["body"]; $newlength="60"; $a_body=substr($str, 0, $newlength); echo " ● <acronym title=". $a_body ."><a href=showarticle.php?id=". $id .">". $a_title ."</a></acronym> [posted ". $a_date ."]";[/code]It works to an extent, it only displays the [b]first word[/b], what am I forgetting? Link to comment https://forums.phpfreaks.com/topic/7267-displaying-part-of-body-as-an-acronym-on-a-link-problems/ Share on other sites More sharing options...
arifsor Posted April 13, 2006 Share Posted April 13, 2006 forgot to put the \ before and after "try this[code] echo " ● <acronym title=\"". $a_body ."\"><a href=showarticle.php?id=". $id .">". $a_title ."</a></acronym> [posted ". $a_date ."]";?>[/code] Link to comment https://forums.phpfreaks.com/topic/7267-displaying-part-of-body-as-an-acronym-on-a-link-problems/#findComment-26479 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.