Skip to content

Commit db7bb6a

Browse files
committed
IHF: array_to_xml readme info added.
1 parent d9104a9 commit db7bb6a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,22 +390,28 @@ $array = [
390390
'Good guy' => [
391391
'name' => 'Luke Skywalker',
392392
'weapon' => 'Lightsaber',
393+
'_attributes' => [
394+
'Rating' => '100',
395+
],
393396
],
394397
'Bad guy' => [
395398
'name' => 'Sauron',
396399
'weapon' => 'Evil Eye',
400+
'_attributes' => [
401+
'Rating' => '90',
402+
],
397403
]
398404
];
399405
400406
$xml = array_to_xml($array);
401407
402408
// <?xml version="1.0"?>
403409
// <root>
404-
// <Good_guy>
410+
// <Good_guy Rating="100">
405411
// <name>Luke Skywalker</name>
406412
// <weapon>Lightsaber</weapon>
407413
// </Good_guy>
408-
// <Bad_guy>
414+
// <Bad_guy Rating="90">
409415
// <name>Sauron</name>
410416
// <weapon>Evil Eye</weapon>
411417
// </Bad_guy>

0 commit comments

Comments
 (0)