note 108984 deleted from language.types.string by cmb

From: Date: Sun, 04 Aug 2019 09:16:32 +0000
Subject: note 108984 deleted from language.types.string by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211812@lists.php.net to get a copy of this message
Note Submitter: Denis R. ---- Hi. I noticed that the documentation does not mention that when you have an XML element which contains a dash (-) in its name can only be accessed using the bracelets notation. For example: <xml version="1"> <root> <element-one>value4element-one</element-one> </root> to access the above 'element-one' using SimpleXML you need to use the following: $simpleXMLObj->root->{'element-one'} to retrieve the value. Hope this helps, Denis R.

« previous php.notes (#211812) next »