473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

echo complex array's

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
0 1550

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JS Bangs | last post by:
I started using PHP's object-oriented stuff a little while ago, which has mostly been a joy. However, I've noticed that they don't seem to echo as I would like. Eg: $this->field = 255;...
2
by: Leif Wessman | last post by:
Hi, What am I doing wrong here? I want to display a transparent pixel... <? $transparent1x1 = array (71, 73, 70, 56, 57, 97, 1, 0, 1, 0, -128, 0, 0, 0, 0, 0, 0, 0, 0, 33, -7, 4, 1, 0, 0, 0,...
4
by: Mantorok Redgormor | last post by:
With what specifier do I use to print a variable of a complex type? The man page for printf doesn't even say. - nethlek
1
by: seia0106 | last post by:
Hello, I have an array X=, whose even and odd indices should represent real and imaginary parts of complex numbers. This I want to use in a routine that uses the typedef double Cx; for storing...
2
by: jccorreu | last post by:
I'm taking in data from multiple files that represents complex numbers for charateristics of different elements. I begin with arrays of doubles and interpolate to get standard values in real and...
25
by: Jon Slaughter | last post by:
I have some code that loads up some php/html files and does a few things to them and ultimately returns an html file with some php code in it. I then pass that file onto the user by using echo. Of...
1
by: perroe | last post by:
Hi I have a array of complex numbers that are stored in a simple double array. This is done since the array is part of an wrapper for an external C library, and the imaginary part of the first...
1
by: sheel331 | last post by:
Hello, I am new to coding in PHP, and had a question about a simple thing: I am trying to echo out the elements of an array for a sidenav in one of my HTML pages, and I can't seem to figure out...
11
by: Twayne | last post by:
Hi, Irrelevant question time, probably: Is there any advantage/reason to use one format over the other for the following two types of echo statements? 1. echo "error is " . $error; 2. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.