This question already has an answer here:
I want to make the text red if username == user_id but it gives me a syntax error, unexpected 'if' (T_IF). my code:
foreach ($dag as $taak) {
echo '<li' if($_SESSION['user_id'] == $taak['username']){ echo 'style="color:red"';}'>'.$taak['taak_naam'].' - '.$taak['username'].'</li>';
}
anyone any idea?
</div>