Until this piece of code was inside a Switch control it was working, as I put it in a IF statement it always returns me an error, see at the end of the message:
if ($numeropezzi >= 2) {
echo ("Numeropezzi >= ".$numeropezzi);
$j=0;
while (isset($pezzoattore[$j])) {
$whereattore=$whereattore."(attore1n LIKE '%".$pezzoattore[$j]."%' OR attore1c LIKE '%".$pezzoattore[$j]."%'
OR
attore2n LIKE '%".$pezzoattore[$j]."%' OR attore2c LIKE '%".$pezzoattore[$j]."%'
OR
attore3n LIKE '%".$pezzoattore[$j]."%' OR attore3c LIKE '%".$pezzoattore[$j]."%')";
if (isset($pezzoattore[$j+1])) {
$whereattore=$whereattore." AND ";
}
$j++;
}
echo $whereattore;
break;
}
Fatal error: Cannot break from 1 loop(s) from nesting level 0 in /home/httpd/html/chivideo/cube.php3 on line 161
I really don't understand why :-(
It seems ok ...