codice:
$j = 0;
while ($tests[$j]==1):
    $j++;
endwhile;
 if ($j==$i) {
     $num=0;
    } else {
     $num=1;;
    }
eh?