foreach( $users as $u ) {
echo '<tr><td>' . $u->nome . '</td><td>' . $u->username . '</td><td>' . $u->email . '</td><td>' . ( $u->acesso == 1 ? '<b>Administrador</b>' : 'Aluno' ) . '</td><td><a href="/website/admineditar.php?id=' . $u->id . '">Alterar</a> <a href="/website/adminremover.php?id=' . $u->id . '" onclick="return confirm(\'Deseja mesmo remover este utilizador?\');">Remover</a></td></tr>';
}
so my problem is on this part
( $u->acesso == 1 ? '<b>Administrador</b>' : 'Aluno' )
i would like it to be doing something like this
( $u->acesso == 1 ? '<b>Administrador</b>' : $u->acesso == 0 ? 'Aluno' : 'Enc. educação' )
but don't know how to do it. I tried to use if
and elseif
but gives me an error.