Lets say you are having a user provide information.
Array 1
But not all is required. So you have defaults.
Array 2
$defaults = array( 'some_key_1'=>'default_value_1', 'some_key_2'=>'default_value_2', ); $inputs = array_merge($defaults, $inputs)
Note that if the $inputs array contains keys not in the $defaults array they will be added in the result.