|
Posted by Rik Wasmus on 09/06/07 14:50
On Thu, 06 Sep 2007 15:47:51 +0200, Rik Wasmus =
<luiheidsgoeroe@hotmail.com> wrote:
> 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 i=
n
>> a random sequence.
>> Thanks for suggestions.
>
>
> $string =3D "one two three four five";
> $array =3D explode(' ', $string);
> shuffle($array);
> $string =3D implode(' ',$string);
....ofcourse:
$string =3D implode(' ',$array);
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|