File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -299,17 +299,17 @@ Converts xml string to array:
299299$array = xml_to_array(' < ? xml version=" 1.0" encoding=" UTF-8" ? >
300300< root>
301301 < tasks>
302- < task>
302+ < task priority= " low " >
303303 < to> John< /to>
304304 < from> Jane< /from>
305305 < title> Go to the shop< /title>
306306 < /task>
307- < task>
307+ < task priority= " medium " >
308308 < to> John< /to>
309309 < from> Paul< /from>
310310 < title> Finish the report< /title>
311311 < /task>
312- < task>
312+ < task priority= " high " >
313313 < to> Jane< /to>
314314 < from> Jeff< /from>
315315 < title> Clean the house< /title>
@@ -325,16 +325,25 @@ $array = xml_to_array('<?xml version="1.0" encoding="UTF-8"?>
325325// ' to' => ' John' ,
326326// ' from' => ' Jane' ,
327327// ' title' => ' Go to the shop' ,
328+ // ' @attributes' => [
329+ // ' priority' => ' low' ,
330+ // ],
328331// ],
329332// 1 => [
330333// ' to' => ' John' ,
331334// ' from' => ' Paul' ,
332335// ' title' => ' Finish the report' ,
336+ // ' @attributes' => [
337+ // ' priority' => ' medium' ,
338+ // ],
333339// ],
334340// 2 => [
335341// ' to' => ' Jane' ,
336342// ' from' => ' Jeff' ,
337343// ' title' => ' Clean the house' ,
344+ // ' @attributes' => [
345+ // ' priority' => ' high' ,
346+ // ],
338347// ],
339348// ],
340349// ],
You can’t perform that action at this time.
0 commit comments