How to print an array of $POST
Posted: Sun Oct 03, 2010 3:23 pm
Hi all
This is probably the easiest question ever
, but I am not familiar with arrays , so hope somebody can help me
User post this checkbox array form:
<input type="checkbox" name="type[0][]" value="1" >
<input type="checkbox" name="type[0][]" value="2" >
<input type="checkbox" name="type[0][]" value="3" >
I need to get all checked values and print them ...
How can I do this?
I tried the code below, but it only returns me one value
Any help???
Thanks!!
This is probably the easiest question ever
User post this checkbox array form:
<input type="checkbox" name="type[0][]" value="1" >
<input type="checkbox" name="type[0][]" value="2" >
<input type="checkbox" name="type[0][]" value="3" >
I need to get all checked values and print them ...
How can I do this?
I tried the code below, but it only returns me one value
Code: Select all
$values = array($_POST["type"]);
foreach ($values as $item){
echo $item;
}
Any help???
Thanks!!