Credit Cards - MPAA - Naruto 77 . Naruto 78 - Free Advertising - Credit Cards

PDA

View Full Version : PHP n00b, trying to learn.


Whitey
Oct 28th 2007, 10:40 am
Im trying to learn a bit of PHP and I want to make a very small script where you define some sentances and then use a PHP function to randomize them and output them.

If my sentances were:

Hello, how are you?
Im fine thanks.
So, what you doing?

I would define them as something like $sentance1, $sentance2 ect.

I just need the name of a PHP function that will randomize a series of variables and then output ONE of them. I can do the rest on my own, but I just need the name of that function. Cheers:)

nico_swd
Oct 28th 2007, 10:42 am
I think this will be enough for you: www.php.net/array_rand

:)

Whitey
Oct 28th 2007, 10:49 am
Thanks very much :)