Created
April 7, 2017 09:32
-
-
Save muhtarudinsiregar/bc73693f02206c5c03cb1bd6ad3658c8 to your computer and use it in GitHub Desktop.
Case Study 14
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
| <!-- merge multidimensional array --> | |
| $users = [ | |
| [ | |
| 'id' => 1, | |
| 'name' => 'Adimas Lutfi Wicaksono', | |
| ], | |
| [ | |
| 'id' => 2, | |
| 'name' => 'Salman Alfarisi', | |
| ], | |
| [ | |
| 'id' => 3, | |
| 'name' => 'Muhammad Sholeh', | |
| ], | |
| ]; | |
| $users_new = [ | |
| [ | |
| 'id' => 4, | |
| 'name' => 'Yadi Cahyadi', | |
| ], | |
| [ | |
| 'id' => 5, | |
| 'name' => 'Maya Maulani', | |
| ], | |
| ]; | |
| print_r(array_merge($users, $users_new)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment