note 60789 deleted from ref.simplexml by didou
| From: | didou@php.net | Date: | Tue, 16 Jan 2007 00:52:49 +0000 |
| Subject: | note 60789 deleted from ref.simplexml by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121768@lists.php.net to get a copy of this message | ||
Note Submitter: greyl at greyworld dot net
----
If you want to use XML elements containing a '-', you can use a variable:
<?php
$xml = simplexml_load_file("test.xml");
$tag = 'first-name';
echo $xml->$tag->asxml();
?>