What is difference between array_merge and array_combine?



What is difference between array_merge and array_combine?..

Answer / Bheem Singh

array_merge() merges two or more arrays together, with duplicate keys being overwritten by the last array. While array_combine() creates a new array with keys from one array and values from another. If there are duplicate keys in both arrays, it will use keys from the first array for the combined array.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What does a special set of tags do in php?

1 Answers  


How would you open a directory for reading in php?

1 Answers  


How do sessions work in php?

1 Answers  


How do I stop php artisan serve in windows?

1 Answers  


How to increase session life time using PHP?

8 Answers  


What is global array in php?

1 Answers  


Which character is used to match exactly one character?

1 Answers  


What does type casting mean in php? Explain with an example?

1 Answers  


How is traits used in php?

1 Answers  


How do I run a php program in dreamweaver?

1 Answers  


What is the integer?

1 Answers  


How to receive a cookie from the browser?

1 Answers  


Categories