954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Random IMG

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 :)

Class
Newbie Poster
21 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

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]<?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";
}

?>[/PHP]

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

Class
Newbie Poster
21 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

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

Class
Newbie Poster
21 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You