Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RSS feed error echo [0]->d:Title

Status
Not open for further replies.

sjaak538

Programmer
Joined
Mar 22, 2004
Messages
2
Location
NL
Hi

When i parse an rrs feed xml page and i like to print $db[0]->d:Title
I get an error on the ":" in d:Title

How to solve this ?

Here a print_r from $db[0]
Array Database of RestDB objects:
Array
(
[0] => restDB Object
(
[Location] => Amsterdam
[d:Title] => Anaar Restaurant
[Address] => Kalverstraat 15
[City] => Amsterdam
[Country] => Netherland
)

}

Thanks for tacking time to look at this problem
Cheers
 
It's the presence of the colon ":" in the attribute name.

The only workaround I can think of is to use get_object_vars() to get a version of the values in the object into an associative array. Then reference the array instead of the object.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top