array_merge and array_combine in PHP

Computer Science
Tutor: None Selected Time limit: 1 Day

What is the difference between array_merge and array_combin ?

Jun 3rd, 2015

Thank you for the opportunity to help you with your question!

array merge :  array_merge() id used to merge the elements of one or more than one array in such a way  that the value of one array appends at the end of first array. If the any of the arrays have same key ,then the later value overrides the previous value for that key. The output of the function is one resultant array and this function takes two arrays as input.

array combine : array_combine() is used to creates a new array by using the key of one array as keys and using the value of other array as values.One thing to keep in mind while using array_combine() that number of values in both arrays must be same.


Please find the solution enclosed here with .. In case of any doubt please feel free to ask…  Do not forget to best my answer… If you are having some other problem please feel free to contact me for quick & quality services..

Use my promo code: Saroj N, and  get $10 Free


Please let me know if you need any clarification. I'm always happy to answer your questions.
Jun 3rd, 2015

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Jun 3rd, 2015
...
Jun 3rd, 2015
Dec 10th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer