Hey all!
I have a webform that has 6 checkboxes all of which if checked go into a hardware[] array. Each form element looks like this:
<input type="checkbox" name="hardware[]" value="Item Name">Item Name
On my processing page I pull the checkboxes into the variable called $hardware like this:
<?
$hardware = $_POST['hardware'];
?>
My question is this: I want to print the contents of the array to my page. I know I'm doing it wrong because it doesn't work but here's what I have now:
<? foreach($hardware['hardware'] AS $hwItem){
echo $hwItem.", ";
}
?>
What is the proper syntax to iterate through the array and print the stored values of the array which is stored inside my $hardware variable???
TIA! I appreciate all help.
Ryan