I am new to php, I have an associative array like this
$arr['Joe'] = "test1";
$arr['Joe'] = "test2";
$arr['Joe'] = "test3";
how do I loop through all the values test1, test2, test3 of this specific key Joe?
I tried this
foreach ($arr as $key => $value) {
echo $value;
}
and this
foreach ($arr as $key => $value) {
echo $arr [$key]['Joe'];
}
But nothing ! Please help me?
Joewill always betest3.$arr['Joe'][0] = "test1";etc..