Created
September 10, 2011 12:34
-
-
Save johanbrook/1208257 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <app id="1"> | |
| <name>Blah</name> | |
| <price locale="sv">19,31</price> | |
| <price locale="no">16,39</price> | |
| <price locale="da">15,65</price> | |
| <price locale="all">2.12</price> | |
| </app> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Output: | |
| SimpleXMLElement Object( | |
| [name] => Blah | |
| [price] => Array | |
| ( | |
| [0] => 19,31 | |
| [1] => 16,39 | |
| [2] => 15,65 | |
| [3] => 2.12 | |
| ) | |
| ) | |
| I want something like this: | |
| SimpleXMLElement Object( | |
| [name] => Blah | |
| [price] => Array | |
| ( | |
| [sv] => 19,31 | |
| [no] => 16,39 | |
| [da] => 15,65 | |
| [all] => 2.12 | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment