How could i create x amount of checkboxes based on how many items are in a database and populate each check box with a php variable containing the data from the database. I have had a go and come up with the code below: But i cant seem to get it to work.
$sql1 = mysql_query("SELECT equipmentid, description FROM equipment") or die(mysql_error());
$row = mysql_fetch_assoc($sql1);
<?php for($i = "0"; i < strlen($row); $i++){ echo'<input type="checkbox" name="equipment" value="$row"/>';}?>