By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,674 Members | 1,383 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,674 IT Pros & Developers. It's quick & easy.

echo complex array's

P: n/a
Hello
I've a question about printing complex array's

with print_r $xmlC->obj_data I get this example bellow
But can anybody give me one example on how to echo
$xmlC->obj_data[RDF][0]['Restaurant'][0]['City'][0];
I try'd with combinations like
$xmlC->obj_data[RDF][0]->Restaurant->[0]->City->[0];
But I must be horrobly wrong.

Thanks

stdClass Object
(
[RDF] => Array
(
[0] => stdClass Object
(
[xmlnsr] =>
http://www.w3.org/TR/1999/REC-rdf-syntax-19990222
[xmlnss] =>
http://www.w3.org/TR/2000/CR-rdf-schema-20000327
[xmlnsd] => http://purl.org/dc/elements/1.0/
[Restaurant] => Array
(
[0] => stdClass Object
(
[id] =>
Afghanistan/Kabul/Anaar_Restaurant1046807280
[Location] => Array
(
[0] => Afghanistan/Kabul
)

[Title] => Array
(
[0] => Anaar Restaurant
)

[Address] => Array
(
[0] => House Number 6,
Street 4
)

[City] => Array
(
[0] => Kabul
)

[Country] => Array
(
[0] => Afghanistan
)

[Phone] => Array
(
[0] => 070 284 315, 070
291 857
)

[CrossStreet] => Array
(
[0] => Kolola Pusta behind
the UNICA guesthouse
)

[Hours] => Array
(
[0] => daily 11am-3pm,
7pm-11pm
)

[ParsedHours] => Array
(
[0] =>
11-15,19-23|11-15,19-23|11-15,19-23|11-15,19-23|11-15,19-23|11-15,19-23|11-15,19-23
)

[FoodRating] => Array
(
[0] => 4.0
)

[ServiceRating] => Array
(
[0] => 4.0
)

[AmbianceRating] => Array
(
[0] => 6.0
)

[OverallRating] => Array
(
[0] => 6.0
)

[RecommendedDishes] => Array
(
[0] => Sesame Chicken
(appetizer)
)

[Cuisine] => Array
(
[0] => Thai
[1] => Indian / Pakistani
[2] => Chinese
)

[Review] => Array
(
[0] => stdClass Object
(
[r:resource] =>
Afghanistan/Kabul/Anaar_Restaurant1046807280|1071492143
)

)

)

[1] => stdClass Object
(
[id] =>
Afghanistan/Kabul/B's_Place_Restaurant1046808819
[Location] => Array
(
[0] => Afghanistan/Kabul
)

[Title] => Array
(
[0] => s Place Restaurant
)

[Address] => Array
(
[0] => Qali Fatullah
)
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.