I have a ternary operator which will echo styles for an HTML tag. I have tried erasing or adding parentheses but there's still an error.
foreach( $result as $row ) {
$us = $row['username'];
echo '<div id="msg_guest" style="'.($us != 'Admin' ? ($us != 'inTELLigence' ? 'float: right; background-color: #51b8c1':'float: left;')).'"><div id="usr" style="'.($us != 'Admin' ? ($us != 'inTELLigence'? 'background-color: #67d5de':'background-color: #e6898a')).'"><div id="user">'.$row['username']. '</div><div id="time">'.$row['time_now'].'</div></div><p id="msg"> '.$row['message'].'</p></div><br />';
}
You have not close condition completely for your first statement near
left;'))
you actually needleft;') : '')
Replace
with