note 108984 added to language.types.string

From: Date: Sun, 10 Jun 2012 11:01:58 +0000
Subject: note 108984 added to language.types.string
Groups: php.notes 
Request: Send a blank email to php-notes+get-188514@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 79.112.79.182 ---- Manual Page -- http://www.php.net/manual/en/language.types.string.php Edit -- https://master.php.net/note/edit/108984 Del: integrated -- https://master.php.net/note/delete/108984/integrated Del: useless -- https://master.php.net/note/delete/108984/useless Del: bad code -- https://master.php.net/note/delete/108984/bad+code Del: spam -- https://master.php.net/note/delete/108984/spam Del: non-english -- https://master.php.net/note/delete/108984/non-english Del: in docs -- https://master.php.net/note/delete/108984/in+docs Del: other reasons-- https://master.php.net/note/delete/108984 Reject -- https://master.php.net/note/reject/108984 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#188514) next »