Any variable submitted by a form, since PHP 4.1.0, are stored in $POST if request method is POST, and in $GET if request method is GET.
How does an array works ?? With indexes and values.
Let's create a simple array...
$my_array = array("lalala", "lelele", "lilili");
In this example :
$my_array[0] = "lalala"
$my_array[1] = "lelele"
$my_array[2] = "lilili"
"0", "1" and "2" are indexes, "lalala", "lelele", "lilili" are values. When you use this method, always remember that the first value is index 0, second value is index 1, etc.
You also can make an array like this :
$my_array = array("a" => "lalala",
"b" => "lelele",
"c" => "lilili");
In this example :
In this example :
$my_array["a"] = "lalala"
$my_array["b"] = "lelele"
$my_array["c"] = "lilili"
To make exactly the same thing, you could have written :
$my_array = array();
$my_array["a"] = "lalala";
$my_array["b"] = "lelele";
$my_array["c"] = "lilili";
You also can put arrays in arrays...
$my_array = array("a" => "lalala",
"b" => array("val0", "val1", "val2"),
"c" => "lilili");
Would produce :
$my_array["a"] = "lalala"
$my_array["b"][0] = "val0"
$my_array["b"][1] = "val1"
$my_array["b"][2] = "val2"
$my_array["c"] = "lilili"
To count the number of elements in an array, use count() or sizeof().
But you can use the extract() function to takes indexes and make "normal" variables with their values... Example :
$my_array = array("a" => "lalala",
"b" => "lelele",
"c" => "lilili");
extract($my_array);
Would produce :
$a = "lalala"
$b = "lelele"
$c = "lilili"
So, if you absolutely want to have "normal" variables with POST datas, use extract($_POST).
For arrays, see http://www.php.net/manual/en/ref.array.php
I REALLY REALLY REALLY recommend you to read about arrays. You should be able to manipulate them. When you'll understand them, you'll can stop using them !!!
I hope this helped you ! If you have any question, don't be shy, email-me !