I'm extracting data and then creating an array like:
$foo = $_POST[ 'foo' ];
$bar = $_POST[ 'bar' ];
$val = array( 'foo' => $foo, 'bar' => $bar );
Is it possible to have a shortcut function?
Something like the following:
$val = array( someFunction( 'foo' ), someFunction( 'bar' ) );
Where:
function someFunction( $name ) {
return( "$name" => $_POST[ $name ] ); // Does not work!
}