Accessing an object property in PHP

Zom

Zom

Associate
Joined
18 Oct 2002
Posts
1,117
I'm messing around with the google calendar API and I don't know how to access the location of any events. When I run
PHP:
print_r($event->where);

The output is:

Code:
Array ( [0] => Zend_Gdata_Extension_Where Object ( [_rootElement:protected] 
=> where [_label:protected] 
=> [_rel:protected] 
=> [_valueString:protected] 
=> Location101 [_entryLink:protected] 
=> [_rootNamespace:protected] 
=> gd [_rootNamespaceURI:protected] 
=> [_extensionElements:protected] 
=> Array ( ) [_extensionAttributes:protected] 
=> Array ( ) [_text:protected] 
=> [_namespaces:protected] 
=> Array ( [atom] 
=> Array ( [1] 
=> Array ( [0] 
=> http://www.w3.org/2005/Atom ) ) [app] 
=> Array ( [1] 
=> Array ( [0] 
=> http://purl.org/atom/app# ) [2] 
=> Array ( [0] 
=> http://www.w3.org/2007/app ) ) [gd] 
=> Array ( [1] => Array ( [0] 
=> http://schemas.google.com/g/2005 ) ) [openSearch] 
=> Array ( [1] 
=> Array ( [0] 
=> http://a9.com/-/spec/opensearchrss/1.0/ ) [2] 
=> Array ( [0] 
=> http://a9.com/-/spec/opensearch/1.1/ ) ) [rss] 
=> Array ( [1] 
=> Array ( [0] 
=> http://blogs.law.harvard.edu/tech/rss ) ) ) ) )

The question is how can I get the location (in this case Location101) into a variable?

Thanks in advance..
 
Thanks for your help. In the end I found that I needed to use:

PHP:
print($event->where[0]->getValueString());

Thanks again.
 
Back
Top Bottom