note 92273 rejected from book.simplexml by tomsommer

From: Date: Fri, 17 Jul 2009 09:31:51 +0000
Subject: note 92273 rejected from book.simplexml by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-158401@lists.php.net to get a copy of this message
Note Submitter: joerg dot agatz at gmail dot com ---- I have a Problem: My XML: <add> <doc> <KAPITEL> <lield name=test>hallo test</field> <lield name=test2>hallo test2</field> <lield name=test3>hallo test3</field> <lield name=test4>hallo test4</field> </KAPITEL> </doc> </add> My PHP: <?php $xml = simplexml_load_file("test.xml"); $test = $xml->doc->KAPITEL->field[1]; ?> <?=$test?> Now i get: hallo test2 i need to autput with Name $test = $xml->doc->KAPITEL->field[test3]; but it dosent Work :-(

« previous php.notes (#158401) next »