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 Quote Link to comment 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>"; Quote Link to comment 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 ' Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.