<?php
$a = array('green', 'red', 'yellow');$b = array('avocado', 'apple', 'banana');$c = array_combine($a, $b);
print_r($c);?>
The above example will output:
Array ( [green] => avocado [red] => apple [yellow] => banana )
WebDeveloper Programing PHP, CodeIgniter, HTML5, CSS3, JQUERY, Bootstrap & Scripting Tutorials
<?php
$a = array('green', 'red', 'yellow');$b = array('avocado', 'apple', 'banana');$c = array_combine($a, $b);
print_r($c);?>
Array ( [green] => avocado [red] => apple [yellow] => banana )
0 comments:
Post a Comment