How can I make a PHP script that will choose HTML script randomly or something like that. I want to make it so it will choose 3-4 ramndom squares. Each square has it's image and a text. The squares should be displaid on one line.
Can I just use php for that?
how to make a Random script?
Moderator: General Moderators
-
tsalexey544
- Forum Commoner
- Posts: 41
- Joined: Thu Jun 22, 2006 11:19 am
-
tsalexey544
- Forum Commoner
- Posts: 41
- Joined: Thu Jun 22, 2006 11:19 am
Random script? That's easy:

tsalexey544, you'd better try to explain what you're after in more words. Heuristics fails on short sentences.
Code: Select all
cat /dev/urandom > script.phptsalexey544, you'd better try to explain what you're after in more words. Heuristics fails on short sentences.
- aerodromoi
- Forum Contributor
- Posts: 230
- Joined: Sun May 07, 2006 5:21 am
Re: how to make a Random script?
What's a square?tsalexey544 wrote:How can I make a PHP script that will choose HTML script randomly or something like that. I want to make it so it will choose 3-4 ramndom squares. Each square has it's image and a text. The squares should be displaid on one line.
Can I just use php for that?
An image created on the fly, a "regular" image, a rectangular div?
You might want to take a look at: http://de3.php.net/manual/en/function.rand.php
aerodromoi
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA