Joomla.it Forum

Componenti per Joomla! => Gestione utenti e community => : Leviathan73 03 Aug 2008, 12:27:02

: Function random
: Leviathan73 03 Aug 2008, 12:27:02
Salve a tutti! In questa funzione random
:
function random($array)
{
   $today = date('j');
   $total = count($array);
   $rand=0; 

   for($i=0;$i<$total;$i++)
     $rand=$rand+$i+$today;

    if($rand>$total)
     for(;$rand>$count;)
       $rand=$rand/2;

    return $rand;
}
dovrebbe cambiare immagine ogni 24 ore, ma non cambia, rimane sempre la stessa immagine. Non capisco dove sia il problema. Grazie mille :o