How To Merge Values of Two Arrays into a Single Array
How To Merge Values of Two Arrays into a Single Array? - PHP Script Tips - PHP Built-in Functions for Arrays
You can use the array_merge() function to merge two arrays into a single array. array_merge() appends all pairs of keys and values of the second array to the end of the first array. Here is a PHP script on how to use array_merge():
<?php $lang = array("Perl", "PHP", "Java",); $os = array("i"=>"Windows", "ii"=>"Unix", "iii"=>"Mac"); $mixed = array_merge($lang, $os); print("Merged:\n"); print_r($mixed); ?>
This script will print:
Merged: Array (  => Perl  => PHP  => Java [i] => Windows [ii] => Unix [iii] => Mac )
2007-04-21, 9453👍, 0💬
What is the sequence of UML diagrams in project? First let me say some fact about this question, you...
How do we enable SQL Cache Dependency in ASP.NET 2.0? Below are the broader steps to enable a SQL Ca...
What are urlencode() and urldecode() functions in PHP? string urlencode(str) - Returns the URL encod...
How To Increment Dates by 1? - Oracle DBA FAQ - Understanding SQL Basics If you have a date, and you...
What is the FP per day in your current company?