Jump to content

[SOLVED] How to make bold


tqla

Recommended Posts

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

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.

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. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.