I got a bit probs how to echo print_r()
output array.
Array (
[one@gmail.com] => Array (
[0] => 70,80
[1] => 90,100
)
[two@gmail.com] => Array (
[0] => 10
)
)
function array_combines($arr1,$arr2) {
$out = array();
foreach($arr1 as $key1 => $value1) {
$out[$value1][] = $arr2[$key1];
}
return $out;
}
print_r(array_combines($a,$b));
I expecting echo:
key: one@gmail.com
value: 70,80 90,100
key: two@gmail.com
value: 10