5
I have two if
parallel and I need to enter one OR the other, not both. But because I am inside one while
with the first if
, I couldn’t put just one else
, having to do another if
outside the while
. So every time he enters the condition of the first if he ends up also entering the second.
There’s something I can put that if I enter the first one it jumps 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>';
}
See what you want because I understood one thing, Sergio understood another. The two answers are radically different, one of the two does not answer what you want. In fact the question is confused. Try to explain better. Sergio erased his, but I don’t know if it’s not hers that’s right.
– Maniero
Yeah, I didn’t see it, now that I walked in here and it was only your answer but that’s right, on the fly!! Thanks!
– Alceu