This is the var_dump of my array (var_dump $syn3):
array(1) {
["@attributes"]=>
array(2) {
["date"]=> string(10) "Sun 16 Oct"
["time"]=> string(5) "21:45"
}
}
I am trying to pull out date and time:
foreach($array2 as $syn3) {
$datemovie = $syn3['@attributes']['date'];
$timemovie = $syn3['@attributes']['time'];
}
The above results in
PHP Notice: Undefined index: @attributes in
I don't get it - this should have worked. Where is my mistake?
@as a key.@is the problem. eval.in/661838. What is the actual array ($array2)?$array2