0
I filled my two arrays that I need to compare perfectly, but I can’t compare all positions... That’s 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 the $arrayDiasSemestre[]
... How could I make it go through all the positions of this array by comparing item by item?
What you have
$arrayDisp['dia']
? Can you give an example of content?– Sergio
I still think it was worth answering the question in the comments, to clarify the question.
– Sergio