Reply to Re: PHP Image by Default

Your name:

Reply:


Posted by Fred Atkinson on 09/03/07 01:15

On Sun, 2 Sep 2007 16:52:26 +0100, "peter" <submit@flexiwebhost.com>
wrote:

>
>> 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'>";
>?>
>

Gentlemen:

I thank you.

Your revision above didn't quite fit my application due to a
quirk in the program being called up (that I didn't show you). But
after I revised it a slight little bit, it did the job just perfectly.
Thank you both for your help. I got it working just fine.

My best regards, :-)



Fred Atkinson

[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

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