Click to See Complete Forum and Search --> : Requesting help


BenVitale
12-14-2007, 05:11 PM
I need help with PHP script, it's with the news script. Basically, the news script displays any image that gets uploaded along with the news item next to it on the page. If no image is added, the scripts adds a default image. What I want is to somehow randomize this default "no-image image", such that if it happens that several news items get uploaded with no images, they won't all show with the same identical default image next to them.

Any ideas?

roscor
12-14-2007, 06:50 PM
You could use array_rand() http://uk.php.net/array_rand

Put all the image paths into an array then use the above function, then call ?

Just a thought, there maybe a better solution, anyone!