> I have 7 checkboxes, which make up the array information. I currently use > implode to make the array, however that array only consists of the > information that it checked. > > What I need to do now is make it so the array will always be 7 items, but if > there isnt a checkbox for the item, I want inserted to be a 0.
You could name the checkboxes such as <input type="checkbox" name="item[0]" value="0"> <input type="checkbox" name="item[1]" value="1"> etc... Then, since you know you have 7 boxes for($x=0;$x<7;$x++) { $final_array[$x] = isset($_GET['item'][$x]) ? $_GET['item'][$x] : 0; } or $ar = array_fill(0,7,0); $final_array = $_GET['item'] + $ar; ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php