Home  >  Article  >  Backend Development  >  PHP array function array_combine() array merge function

PHP array function array_combine() array merge function

WBOY
WBOYOriginal
2016-07-25 08:53:131152browse
  1. $a1=array("a","b","c","d");
  2. $a2=array("Cat","Dog","Horse", "Cow");
  3. print_r(array_combine($a1,$a2));
  4. ?>
Copy code

output: Array ( [a] => Cat => Dog [c] => Horse [d] => Cow )



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn