Hi!

I have a little problem: :o
I downloaded every sort of random image making php scripts, but not one will work! why cis that?

Do somebody know a good random image generating php, that can generate in chain images. With chain i mean, for example i have an image sliced on my website, and i want that i shall randomize these two, but every imiga has his pair.
Just too see it clearly: *because I not a got explainer and my english is bad*
I have:
Car_01.gif
Car_02.gif
Bus_01.gif
Bus_02.gif
And i want that the php shall randomized display the car or the bus. But both images 01 and 02 as well.
Is that possible to make? do somebody know a php script that can thse and i free? or can somebody help me to make one? *but I a dummy, so this will be the last opportunity*

Thanks :)

Okay, I got to work a basic random image maker! But now how can i mod it to display chain images? I made this:

<?php 

$start = "1"; 
$total = "2";  
$rand = mt_rand($start, $total);    

if($rand == 1)   {   
$randimg1 = "Car_01.gif";  
$randimg2 = "Car_02.gif";  
}  

if($rand == 2)   {   
$randimg1 = "Bus_01.gif";   
$randimg2 = "Bus_02.gif";  
}     

?>

Is it any good? Can it work? and how can i implement this into a html.php? :o

Okay....It's working! :tadaaa: :cheesy:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.