Jump to content

Don't show if empty


rdub

Recommended Posts

I am using this code which works fine unless there is no entry in price. It then shows the $ and a zero. How can I change the code so than it shows nothing if there is no value?

 

echo "<td width=150 valign=top>".$fetched['id'].

  ("<img . width=150 . src='" .$fetched['Image'] ."' /> ") .

  "<br />"."<span class=style1e>".$fetched['hi_lite']."</span>".

  "<br />".$fetched['Phone'].

  "<span class=style1d>".$fetched['Description']."</span>".

  "<br>"."<span class=style1d>"."<align=center>".$fetched['mls']."</span>".

  "<span class=style1e>"." "." "."$".number_format ($fetched['price'])."</span>".

Link to comment
https://forums.phpfreaks.com/topic/200472-dont-show-if-empty/
Share on other sites

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.