Re: [PHP-XML-DEV] Problems seeing attributes with SimpleXml

[email protected] (Philip Fletcher) Wed, 03 Mar 2004 10:51:08 +0000
Newsgroups php.xml.dev
Organization Stutchbury
Message-ID <[email protected]>
Thanks Rob

Silly me - only looked on the xml-dev list :), but it's actually a switch()
issue isn't it (assumues ints or something)?

Philip 


Rob Richards wrote:

> You need to do:
>     switch((string) $rating['type']) {
> 
> Theres a thread about this on the internals list.
> 
> Rob
> 
> From: "Philip Fletcher" [email protected]
> 
>> I'm running through the SimpleXml examples on
> http://uk.php.net/simplexml.
>> Unfortunately I can't get Example 4 to work as advertised. When I do a
>> var_dump($xml) the $rating['type'] attributes do show up: