Page 1 of 1
how to make a Random script?
Posted: Tue Jun 27, 2006 3:45 am
by tsalexey544
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?
Posted: Tue Jun 27, 2006 6:45 am
by JayBird
Run that by us again!?

Posted: Tue Jun 27, 2006 7:04 am
by tsalexey544
How to make a random script?
Posted: Tue Jun 27, 2006 7:45 am
by Weirdan
Random script? That's easy:
tsalexey544, you'd better try to explain what you're after in
more words. Heuristics fails on short sentences.
Re: how to make a Random script?
Posted: Tue Jun 27, 2006 9:41 am
by aerodromoi
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?
What's a square?

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
Posted: Tue Jun 27, 2006 10:13 am
by RobertGonzalez
Are you pulling from a database, or is what you are going to display going to be generated code-side? Or is the data already stored in an array? Give more details.