PHP/javascript help

Posted By: cbirdsong22 ()
Posted On: 2006-Jun-24 02:28

Hi,
my site has the following PHP code:

if ($s == 0)

{
print "<font face=arial size=2>No advertisement has been posted- Be the first to advertise in your town this week.</font>";
}

this basically says, if no data is present, say the above.

How can I make it so my PHP says, if no ads are present, run this javascript (it's a basic script).

any help would be greatly appreciated.

PS.. Clearly, I'm a PHP novice.


Posted By: Dinkar (Staff)
Posted On: 2006-Jun-24 06:53

Write JS function in HTML head and call it using php's print function.