note 97907 added to book.simplexml
| From: | nogitsune101 at osu1 dot php dot net | Date: | Sat, 15 May 2010 07:27:07 +0000 |
| Subject: | note 97907 added to book.simplexml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169269@lists.php.net to get a copy of this message | ||
I don't know if there is another way or not, but I actually had a need to return a value from a
simpleXMLElement, not just pass a referenced object and echo it out. After poking around a for a
quick fix, I saw a few posts looking for the the same answer.
function captureValue($value)
{
ob_start();
echo $value;
$output = ob_get_contents();
ob_end_clean();
return $output;
}
Anyways, if anyone knows if/how to return simpleXMLElement's value as a variable, I'd much
rather use it than the clunky solution above.
----
Server IP: 69.147.83.197
Probable Submitter: 67.162.131.216
----
Manual Page -- http://www.php.net/manual/en/book.simplexml.php
Edit -- https://master.php.net/note/edit/97907
Del: integrated -- https://master.php.net/note/delete/97907/integrated
Del: useless -- https://master.php.net/note/delete/97907/useless
Del: bad code -- https://master.php.net/note/delete/97907/bad+code
Del: spam -- https://master.php.net/note/delete/97907/spam
Del: non-english -- https://master.php.net/note/delete/97907/non-english
Del: in docs -- https://master.php.net/note/delete/97907/in+docs
Del: other reasons-- https://master.php.net/note/delete/97907
Reject -- https://master.php.net/note/reject/97907
Search -- https://master.php.net/manage/user-notes.php