Re: Re: Example from www.php.net
| From: | Chris | Date: | Tue, 03 Apr 2007 03:29:06 +0000 |
| Subject: | Re: Re: Example from www.php.net | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251958@lists.php.net to get a copy of this message | ||
Timothy Murphy wrote:
Timothy Murphy wrote:If it's an official comment (not a user comment) then post a documentation bug report at http://bugs.php.net/ -- Postgresql & php tutorials http://www.designmagick.com/I was trying Example 2147, which reads: ------------------------------- <?php $string = <<<XML <a xmlns:b> <foo name="one" game="lonely">1</foo> </a> XML; $xml = simplexml_load_string($string); foreach($xml->foo[0]->attributes() as $a => $b) {...echo $a,'="',$b,"\"\n";} ?> -------------------------------However, in my case it outputs nothing. (I'm running php-5.1.6 under Fedora-6.)I see that the example does work if I substitute <a> for <a xmlns:b>. [I'm not sure what effect the xmlns:b has?]