This topic is locked

Replace displayed value

1/4/2008 3:01:21 PM
PHPRunner General questions
C
Christopher author

I have a page with dates on it, and not all events have dates. Where they do not, the db value is null. I want to show the phrase "Coming Soon" where the db value is null and the actual date where it exists.

if ($value==null)

$str.= print "Coming Soon";

$value=$str;


This is one of several variations of code I have tried based on other posts around conditional formatting. So far I have had no success.
Thanks in advance for any help.

J
Jane 1/9/2008

Hi,
try to use this code:

if (!$value)

$value = "Coming soon";