Created
May 24, 2012 05:53
-
-
Save sandeepshetty/2779709 to your computer and use it in GitHub Desktop.
PHP array union operator example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$default_settings = array('page'=>3, 'per_page'=>100); | |
$user_override = array('per_page'=>50, 'format'=>'json'); | |
$overriden_setting = $user_override + $default_settings; | |
print_r($overriden_setting); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment