I'm trying to hide a table row whenever $visible is not empty:
<?php
$visible = "yes"; // hide the row if different than "0"
?>
<HTML>
//Big HTML Block
<tr<?= !$visible ? "" : "class=\"hidden\""; ?>>
but my output is:
<tr>
instead of:
<tr class="hidden">
What's wrong? and is there a better way to do what I'm trying to do here?
I do it this way basically since I want to define right at the top of the code, whether that <TR> that comes after a lot of HTML code, will be visible or not. It's a sort of a template that I'm creating.