How to read if a checkbox is checked in PHP?
When using checkboxes as an array:
You should use in_array():
in_array()
if(in_array('Orange', $_POST['food'])){ echo 'Orange was checked!'; }
Remember to check the array is set first, such as:
if(isset($_POST['food']) && in_array(...