ciao a tutti,
ho cambiato server e, nel passaggio, ciò che prima andava bene ora dà errore.
dato questo codice
Codice PHP:
function creabox($tipo){
global $mysqlc;
$mysqlc->query("SELECT nome, path_strutture FROM TABELLA WHERE tipo_struttura='$tipo';");
for($i=0; ($result4 = mysql_fetch_array($mysqlc->result, MYSQL_ASSOC)) !== FALSE; $i++){
$data[$i] = "<a href=\"".$result4['path_strutture']."\" style=\"text-decoration: none;\">".$result4['nome']."</a>
";
}
for($c=0; $c<5; $c++){
do{
$val = rand(0,($i-1));
[b]RIGA 29-->[/B] }while (($rsia = array_search($val, $r)) !== FALSE);
echo $data[$val];
$r[$c] = $val;
}
}
mi restituisce questo errore
codice:
Warning: array_search(): Wrong datatype for second argument in /home/httpd/vhosts/SITO.it/httpdocs/CON/box.php on line 29
cosa succede?
grz daniele.