I filled in my two arrays that I need to compare perfectly, but I can not compare all the positions ... This is the case:
foreach($periodo as $data){
$arrayDiasSemestre[] = $data->format("w");
}
include_once 'classes/professoresclass.php';
if(!isset($_SESSION)){ session_start(); }
$idSemestre = $_SESSION['SemestreGeral'];
$oProfessor = new professoresclass();
$oProfessor ->listarDisponibilidade4($idSemestre);
while ($arrayDisp = mysql_fetch_array($oProfessor->retorno())){
if ($arrayDisp['dia'] == $arrayDiasSemestre[]) {
echo $arrayDisp['idP'];
}
}
The problem is $arrayDiasSemestre[]
... How could I make it go through all the positions of this array by comparing item by item?