I have this php echo statement for a checkbox that is in a loop:
echo "<input name='battery[$i]' type='checkbox' id='battery[$i]' value='Yes' style='margin-top:10px; margin-left:15px;' />";
I would like to add this condition to it based on a query result:
<?php if($rowbill['battery'] == "Yes") print "checked"; ?>
But I am having a hard time getting the correct syntax for the concatenate, please some help would be appreciated.