Hi All
I have a php array containing the mysql values of checkboxes, which has been selected previously. I am trying to do an edit page of sorts which will show the already selected checkboxes, but seem to be having issues with it. I've tried different ways but can't seem to get it working.
Here's my php array of previously selected checkboxes:
Array
(
[0] => 1
[1] => 3
)
And here's my checkboxes:
<input type="checkbox" name="company[]" id="company[]" value="1">
<input type="checkbox" name="company[]" id="company[]" value="4">
<input type="checkbox" name="company[]" id="company[]" value="2">
<input type="checkbox" name="company[]" id="company[]" value="3">
I can't seem to work out how to get the checkboxes (from the php array - value 1 and 3) to already be selected..