PHP Programing language

adplus-dvertising
Write a program to create an array by using one array for keys and another for its values
Previous Home Next
<html>
<head>
<title>create an array to another array</title>
</head>
<body>
<?php
$a;
$s;
$stateMap;

   $a = array("Ali","Akhil","Akash","Arun");
   $s = array("Alabama","Alaska","Arizona","Arkansas");
   $stateMap = array_combine(  $a , $s);
   print_r($stateMap);
?>
</body>
</html>

Output:

Previous Home Next