note 74717 added to function.simplexml-load-string

From: Date: Tue, 24 Apr 2007 21:46:45 +0000
Subject: note 74717 added to function.simplexml-load-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-125843@lists.php.net to get a copy of this message
It's worth noting that in the example above, $xml->body will actually return an object of type SimpleXMLElement, not a string, e.g. SimpleXMLElement Object ( [0] => this is the text in the body tag ) If you want to get a string out of it you must explicitly cast it using (string) or double quotes, or pass $xml->body (or whatever attribute you want to access) to any function that returns a string, such as urldecode() or trim(). ---- Server IP: 69.39.81.135 Probable Submitter: 63.210.45.222 ---- Manual Page -- http://www.php.net/manual/en/function.simplexml-load-string.php Edit -- https://master.php.net/note/edit/74717 Del: integrated -- https://master.php.net/note/delete/74717/integrated Del: useless -- https://master.php.net/note/delete/74717/useless Del: bad code -- https://master.php.net/note/delete/74717/bad+code Del: spam -- https://master.php.net/note/delete/74717/spam Del: non-english -- https://master.php.net/note/delete/74717/non-english Del: in docs -- https://master.php.net/note/delete/74717/in+docs Del: other reasons-- https://master.php.net/note/delete/74717 Reject -- https://master.php.net/note/reject/74717 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125843) next »