Posted by Rik Wasmus on 09/06/07 13:47
On Thu, 06 Sep 2007 15:39:06 +0200, pt36 <key.alberto@gmail.com> wrote:
> Hi
> I have a php string like this:
> $string =3D "one two three four five"
> I have to sorting the values randomly every time the page are loaded.
> So, for example:
> first time
> "one two three four five"
> second time
> "three five one four two"
> third time
> "five four two one three"
> ...
> The number are a images in a folder and I have to sort these images in=
> a random sequence.
> Thanks for suggestions.
$string =3D "one two three four five";
$array =3D explode(' ', $string);
shuffle($array);
$string =3D implode(' ',$string);
-- =
Rik Wasmus
[Back to original message]
|