I have two if
parallels and I need to get into one OR on another, not both. However, since I was within while
with the first if
, I could not put just else
, having to make another if
out of while
. So every time it goes into the condition of the first if it ends up also entering the second one.
Is there anything I can put that if I get into the first one it skips the second?
Here is the code:
while ($arrayBancas = mysql_fetch_array($oBanca->retorno())){
if (date('Y-m-d', strtotime($arrayBancas['dataHora'])) == $data->format('Y-m-d')) {
echo '<div class="panel panel-default">';
echo '<div class="panel-heading">';
echo '<a href=""><center><strong>--:--</strong></center></a>';
echo '</div>';
echo '<div class="panel-body">';
echo '<h6>';
echo '<strong>'.$arrayBancas['trabalho'].'</strong><br>';
echo '<strong>Orientador:</strong>'.$arrayBancas['orientador'].'<br>';
echo '<strong>Banca:</strong><br>';
echo '<strong>Sala:</strong>'.$arrayBancas['sala'].'<br>';
echo '</h6>';
echo '</div>';
echo '</div>';
}
}
if (date('Y-m-d', strtotime($arrayBancas['dataHora'])) != $data->format('Y-m-d')) {
echo '<div class="panel panel-default">';
echo '<div class="panel-heading">';
echo '<a href=""><center><strong>--:--</strong></center></a>';
echo '</div>';
echo '<div class="panel-body">';
echo '<h6>';
echo '<strong>----------</strong><br>';
echo '<strong>Orientador:</strong><br>';
echo '<strong>Banca:</strong><br>';
echo '<strong>Sala:</strong><br>';
echo '</h6>';
echo '</div>';
echo '</div>';
}