fork download
  1. <?php
  2.  
  3. $xml = <<<__EOF
  4. <?xml version="1.0" encoding="UTF-8" ?>
  5. <document>
  6. <data>
  7. <width>3.5</width>
  8. <height>2</height>
  9. <edge>.125</edge>
  10. <safe>.125</safe>
  11. </data>
  12. <fold>
  13. <show_lines></show_lines>
  14. <type>online</type>
  15. </fold>
  16. <preview>
  17. <name>testfile</name>
  18. <location>testurl.com</location>
  19. </preview>
  20. <preview>
  21. <name>myfile</name>
  22. <location>someurl.com</location>
  23. <special>frontandback</special>
  24. </preview>
  25. </document>
  26. __EOF;
  27.  
  28.  
  29. print_r($arr);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [data] => Array
        (
            [width] => 3.5
            [height] => 2
            [edge] => .125
            [safe] => .125
        )

    [fold] => Array
        (
            [show_lines] => Array
                (
                )

            [type] => online
        )

    [preview] => Array
        (
            [0] => Array
                (
                    [name] => testfile
                    [location] => testurl.com
                )

            [1] => Array
                (
                    [name] => myfile
                    [location] => someurl.com
                    [special] => frontandback
                )

        )

)