Skip to content

Instantly share code, notes, and snippets.

@kyleheddon
Last active August 29, 2015 14:07
Show Gist options
  • Save kyleheddon/b68181dda7e2c22e3429 to your computer and use it in GitHub Desktop.
Save kyleheddon/b68181dda7e2c22e3429 to your computer and use it in GitHub Desktop.
convert_hidden_inputs_to_array
function convert_hidden_inputs_to_array(){
$arr = array(array(null, null, null), array(null, null, null), array(null, null, null));
for($i = 0; $i < 3; $i++){
for($i = 0; $i < 3; $i++){
if(isset($_POST["cell_$i$j"])){
$value = $_POST["cell_$i$j"];
$arr[$i][$j] = $value;
}
}
}
return $arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment