rushza Posted January 18, 2009 Share Posted January 18, 2009 Hi all, my first post here, very cool forums indeed I need some help with some code please. here is the code snippet print "<dl class=\"glossary_terms\">"; foreach($terms as $term){ print "<dt>". $term->term ."</dt> <dd>". $term->definition ."</dd>"; print "<br>"; } print "</dl>"; I want to add in a break between the term and the term definition as well as bolding the term How would I do this? I have tried print "<dt>". "<b>" $term->term "</b><br /> ."</dt> <dd>". $term->definition ."</dd>"; But I get an error anyhelp would be great thanks Link to comment https://forums.phpfreaks.com/topic/141332-insert-breaks-and-bold-into-php/ Share on other sites More sharing options...
Mchl Posted January 18, 2009 Share Posted January 18, 2009 print "<dt><b> $term->term </b></dt><br/><dd>$term->definition</dd>"; Link to comment https://forums.phpfreaks.com/topic/141332-insert-breaks-and-bold-into-php/#findComment-739697 Share on other sites More sharing options...
spikypunker Posted January 18, 2009 Share Posted January 18, 2009 Yeh you cant put the " marks in after a PRINT command cause it opens and closes the print command. In case you ever do need to do something with a " you can in fact replace it with ' Link to comment https://forums.phpfreaks.com/topic/141332-insert-breaks-and-bold-into-php/#findComment-739707 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.