$arrayRoles = array( array("admin1", "admin1", "administrador"), array("prof1", "prof1", "profesor"), array("alum1", "alum1", "alumno") );
function checkUser($array, $usu) { for ($i = 0; $i < sizeof($array); $i++) { for ($j = 0; $j < sizeof($array[0]); $j++){ if ($usu == $array[$i][$j]){ return true; } } } }
$arrayRoles = array(
array("admin1", "admin1", "administrador"),
array("prof1", "prof1", "profesor"),
array("alum1", "alum1", "alumno")
);
function checkUser($array, $usu) {
for ($i = 0; $i < sizeof($array); $i++) {
for ($j = 0; $j < sizeof($array[0]); $j++){
if ($usu == $array[$i][$j]){
return true;
}
}
}
}