tqla Posted February 26, 2007 Share Posted February 26, 2007 Hi, I would like to bold just $gallery_venue in the string below. if ($gallery_content_array[$gallery_catname]) { $gallery_content_array[$gallery_catname] .= '' . $gallery_date . '<br>' . $gallery_venue . '<br>' . $gallery_address .'<br>' . $gallery_city . ', ' . $gallery_state . '<br>' . $gallery_phone . '<br>' . $gallery_url . '<br>' . $gallery_description . '<br><br>'; FYI, I display the above code with this code wherein the $name is bold. Is it possible to just bold $gallery_venue from within to string at the top without doing anything to the code below? foreach ($gallery_content_array as $name=>$content) { echo "<b>$name</b>"; echo "<br><br>\n"; echo $content; echo "<br><br>\n"; } Thanks. Link to comment https://forums.phpfreaks.com/topic/40217-solved-how-to-make-bold/ Share on other sites More sharing options...
nloding Posted February 26, 2007 Share Posted February 26, 2007 What you're talking about is CSS and HTML, not PHP. I don't know how you're constructing things, but here's one way: if ($gallery_content_array[$gallery_catname]) { $gallery_content_array[$gallery_catname] .= '' . $gallery_date . ' <strong>' . $gallery_venue . '</strong> ' . $gallery_address .' ' . $gallery_city . ', ' . $gallery_state . ' ' . $gallery_phone . ' ' . $gallery_url . ' ' . $gallery_description . ' '; But again, I don't know how you've written the rest of your code. Link to comment https://forums.phpfreaks.com/topic/40217-solved-how-to-make-bold/#findComment-194585 Share on other sites More sharing options...
tqla Posted February 26, 2007 Author Share Posted February 26, 2007 nloding, thanks, this works great! I did try this at first but used b instead of strong and got nothing. I must've missed a ' or something. I just showed the html code for whatever reason. I said that I wanted to use the php code to make it bold and not the html code. I misstyped "the" as "to" so it wasn't clear. oops! Thanks. Link to comment https://forums.phpfreaks.com/topic/40217-solved-how-to-make-bold/#findComment-194637 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.