I have an array that looks like this.
Array
(
[@attributes] => Array
(
[version] => 2.0
)
[channel] => SimpleXMLElement Object
(
[title] => Active Fire Incident Page
[link] => http:
[description] => This page provides information on active Austin/Travis County Fire incidents. Data is updated every 3 minutes.
[lastBuildDate] => Wed, 23 Nov 2016 10:59:38 PM GMT
[copyright] => 2016 City of Austin. All rights reserved.
[language] => en-us
[item] => SimpleXMLElement Object
(
[title] => E ST ELMO RD/SHERATON AVE
[link] => http:
[description] => AFD - 4700 S Congress Ave - BOX -Structure Fire - Wed, 23 Nov 2016 10:51 PM
[pubdate] => Wed, 23 Nov 2016 10:51 PM
)
)
)
How can I repeat the last part of an array? This section:
[title] => E ST ELMO RD/SHERATON AVE
[link] => http:
[description] => AFD - 4700 S Congress Ave - BOX -Structure Fire - Wed, 23 Nov 2016 10:51 PM
[pubdate] => Wed, 23 Nov 2016 10:51 PM
With this code:
echo $xml->channel->item->link;
I get
Notice:Trying to get property of non-object
source
share