Last active
August 6, 2021 17:10
-
-
Save tadeubdev/1ac2489adc584c2179c231e31fa2a8a1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| $arrayOne = ['a' => 'Hello', 'b' => 'World', 'c' => 'Lorem']; | |
| $arrayTwo = ['c' => 'Ipsum', 'd' => 'Dolor']; | |
| print_r($arrayOne + $arrayTwo); | |
| // prints: | |
| // [ | |
| // 'a' => 'Hello', | |
| // 'b' => 'World', | |
| // 'c' => 'Lorem', | |
| // 'd' => 'Dolor' | |
| // ] | |
| print_r($arrayTwo + $arrayOne); | |
| // prints: | |
| // [ | |
| // 'c' => 'Ipsum', | |
| // 'd' => 'Dolor', | |
| // 'a' => 'Hello', | |
| // 'b' => 'World' | |
| // ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment