I have several arrays from $ _REQUEST. For example: $ _REQUEST ['name'] and $ _REQUEST ['email']. That is, inside these arrays there is also an array. It turns out an array in an array.
Assigned them value
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
now I need to remove the first key with the value. For this I used array_shift
array_shift($name);
array_shift($email);
so i got rid of the first value. But, besides the name and email, there are others. It would not be desirable for everyone to write array_shift. How can I apply to all with one function?
thanx
UPD
For example $_REQUEST array:
Array (
[name] => Array (
[0] =>
[1] => myName
)
[email] => Array (
[0] =>
[1] => myEmail
)
[other] => Array (
[0] =>
[1] => otherDatas
)
)
I must get rid of these empty elements
$_REQUEST? Then you could just loop over them:foreach($_REQUEST as $r) array_shift($r);Or do you have a list/array of all variables that should be processed?