- Forums
- PHP
- How To Merge Two Arrays Into One
while reading you post about array_push(), i wanted to post something here to tell your visitors that they can also use the array_merge() function to join or merge two different arrays into one... [2112], Last Updated: Mon Jun 24, 2024
Yonkers
Fri Oct 15, 2010
1 Comments
830 Visits
while reading you post about array_push(), i wanted to post something here to tell your visitors that they can also use the array_merge() function to join or merge two different arrays into one.
in you example, if you have two arrays like this:
$cars
$trucks
and you want to join into one, just do this
<php?
$vehicles = array_merge($cars,$trucks);
?>
https://www.webune.com/forums/20101015cgpz.html