PHP object access using string

Posted by Rob Waring on Stack Overflow See other posts from Stack Overflow or by Rob Waring
Published on 2010-04-27T14:44:15Z Indexed on 2010/04/27 14:53 UTC
Read the original article Hit count: 474

Filed under:
|
|

Hi all,

I have an object in PHP with some very odd property names. I just need to know how to access a property when it's name is "//www.w3.org/1999/02/22-rdf-syntax-ns#type".

I found something that suggested

$object->{'//www.w3.org/1999/02/22-rdf-syntax-ns#type'};  

but that doesn't seem to work.

Thanks in advance

Rob

© Stack Overflow or respective owner

Related posts about php

Related posts about object