|
Posted by pt36 on 09/06/07 15:26
Ok Rik
thanks for your help, but please tell me why this work
<?php
$string = "uno.jpg due.jpg tre.gif quattro.gif cinque.jpg";
$array = explode(' ', $string);
shuffle($array);
$string = implode(' ', $array);
echo $string ;
?>
and this not work
<?php
if ($handle = opendir('banner/')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$file = $file . " ";
$array = explode(' ', $file);
shuffle($array);
$file = implode(' ', $array);
echo $file;
} }
closedir($handle);
}
?>
Navigation:
[Reply to this message]
|