How to add php if condition in this tag?

Just string concatenation

$str .= '<div class="level">'.($row['point'] > 3 ? 'BEST' : '').'</div>';

Leave a Comment