Reply to Re: PHP Image by Default

Your name:

Reply:


Posted by peter on 09/02/07 15:52

> As you can see, I am defining the string as none.jpg. I can't
> imagine why it still thinks it is null.

As Jerry has pointed out. NULL and an empty string are 2 complete different
things. If the code I supplied is not working then the function is not
returning NULL it is returning an empty string.

That being the case change the is_null function to the empty function

<?PHP
$image = getRandomImage('LL/');
if (empty($image))
{
$image = '';// Set to the image you wish
}
echo "<img src='$image' height=90 width=120 alt='LL'>";
?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация