I only want to output an array, first look at my code
CODE:
$shopping = array();
$shopping["john"] = "notebook1";
$shopping["john"] = "notebook2";
$shopping["doe"] = "notebook3";
echo '<pre>';
print_r($shopping);
echo '</pre>';
OUTPUT
Array
(
[john] => notebook2
[doe] => notebook3
)
But I want my output to be like this:
Array('john'=>array('notebook1','notebook2'),'doe'=>'notebook3');
How Can I achieve this?