Hi all!
I'm trying to insert some posted form elements into an array with array_push, but I'm getting this warning.
My code:
What am I doing wrong?PHP Code:$parr = array();
if(isset($_POST['btnsubmit']))
{
foreach($_POST as $key => $val)
{
if( ($key != 'funcionario') && ($key != 'btnsubmit') && ($key != 'btnreset') )
{
array_push($parr[$key], $val);
}
}
echo '<pre>';
print_r($parr);
echo '</pre>';
}
I defined $parr as an array before looping through the $_POST array...
Thank you.







Bookmarks