CODE
<?php
$a = array('31','01','02','03','30','31','01','02');
$b = array('7','7','7','7','8','8','8','8');
$c = array_combine($a,$b);
var_dump($c);
?>
RESULT It ignores the duplicate values with the same key array(5) { [31]=> string(1) "8" ["01"]=> string(1) "8" ["02"]=> string(1) "8" ["03"]=> string(1) "7" [30]=> string(1) "8" }
WHAT I NEED
I need to make an associative array with keys and duplicate values separated by comma.(Here: 31th key has two values 7 and 8)