why this is not working? I want this check the checkbox if pro_cat variable is greater than or equal one else unchecked the checkbox
<?php $checked=""; if($pro_cat>=1){ $checked="checked"; } echo" <tr> <td ><br>Day<hr>Night</td> <td> <label class='container'> <input type='checkbox' checked='$checked'> <span class='checkmark'></span> </label>"; ?>
checked='$checked'with just$checkedcheckedat all makes it checked.checked='off'or='no'or=0will still be checked.