Salve a tutti! In questa funzione random
Codice PHP:
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