$_POST Variable List New bee question
Posted: Mon Aug 31, 2009 10:44 pm
I am fairly new to php and I was wondering if there is a function or object all that will return the following:
Total number of variables or array elements in the $_POST array.
The Variable Names in the $_POST array.
for example if $_POST contains 3 vars such as v1, v2, v3 is there a function that I can call someing like $Count=elements($_POST);
for example if v1 is called Name and v2 is Address and v3 is phone is there something like
$VarNames = array();
$VarNames = Varlist($_POST);
where $VarNames[0] would contain Name, [2] contain Address and [3] contain phone
so therefore instead of
$Name = $_POST['Name'];
$Address = $_POST['Address'];
$Phone = $_POST['Phone'];
I can
$Name = $_POST['$VarName[0]']
$Address = $_POST['$VarName[1]'];
$Phone = $_POST['$VarName[2]'];
I am new to this so please if this sounds like a novice cause I am thx
Total number of variables or array elements in the $_POST array.
The Variable Names in the $_POST array.
for example if $_POST contains 3 vars such as v1, v2, v3 is there a function that I can call someing like $Count=elements($_POST);
for example if v1 is called Name and v2 is Address and v3 is phone is there something like
$VarNames = array();
$VarNames = Varlist($_POST);
where $VarNames[0] would contain Name, [2] contain Address and [3] contain phone
so therefore instead of
$Name = $_POST['Name'];
$Address = $_POST['Address'];
$Phone = $_POST['Phone'];
I can
$Name = $_POST['$VarName[0]']
$Address = $_POST['$VarName[1]'];
$Phone = $_POST['$VarName[2]'];
I am new to this so please if this sounds like a novice cause I am thx