This is a demonstration file. Documentation, example scripts and techniques can be found on the XML to PHP page. You can optionally find more php tutorials, css tutorials and javascript tutorials via the lots of code homepage
« Back to XML to PHP

XML to PHP

XML Data

<?xml version="1.0"?> <rss version="2.0"> <channel> <item> <title>Top 10 Asked Betta Fish Questions</title> <description>Want to know what the top 10 betta fish questions are ?</description> <link>http://www.betta-fish.co.uk/top-10-betta-questions.php</link> </item> <item> <title>How To Breed Betta Fish</title> <description>Want to know how to breed betta fish ?</description> <link>http://www.betta-fish.co.uk/breeding-betta-fish.php</link> </item> <item> <title>Setting Up A Tank For Betta Fish</title> <description>Learn how to set the tank up and maintain it to keep your betta fish in the best health possible</description> <link>http://www.betta-fish.co.uk/betta-fish-tank.php</link> </item> <item> <title>Feeding Your Betta Fish</title> <description>Learn what to feed your betta fish</description> <link>http://www.betta-fish.co.uk/feeding-your-betta-fish.php</link> </item> <item> <title>Betta Fish Diseases</title> <description>Learn what diseases your betta fish could catch</description> <link>http://www.betta-fish.co.uk/betta-fish-diseases.php</link> </item> <item> <title>Betta Fish Compatibility</title> <description>Find out what other types of fish makes </description> <link>http://www.betta-fish.co.uk/betta-fish-diseases.php</link> </item> <item> <title>Essential Betta Fish Books</title> <description>These books are essential to new betta fish owners</description> <link>http://www.betta-fish.co.uk/betta-fish-books.php</link> </item> </channel> </rss>

Parsed PHP Output

Top 10 Asked Betta Fish Questions
Want to know what the top 10 betta fish questions are ?

How To Breed Betta Fish
Want to know how to breed betta fish ?

Setting Up A Tank For Betta Fish
Learn how to set the tank up and maintain it to keep your betta fish in the best health possible

Feeding Your Betta Fish
Learn what to feed your betta fish

Betta Fish Diseases
Learn what diseases your betta fish could catch

Betta Fish Compatibility
Find out what other types of fish makes

Essential Betta Fish Books
These books are essential to new betta fish owners

xmlToPHP Object
(
    [xmlArray] => Array
        (
            [0] => Array
                (
                    [name] => RSS
                    [attrs] => Array
                        (
                            [VERSION] => 2.0
                        )

                    [children] => Array
                        (
                            [0] => Array
                                (
                                    [name] => CHANNEL
                                    [attrs] => Array
                                        (
                                        )

                                    [children] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [name] => ITEM
                                                    [attrs] => Array
                                                        (
                                                        )

                                                    [children] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [name] => TITLE
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Top 10 Asked Betta Fish Questions
                                                                )

                                                            [1] => Array
                                                                (
                                                                    [name] => DESCRIPTION
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Want to know what the top 10 betta fish questions are ?
                                                                )

                                                            [2] => Array
                                                                (
                                                                    [name] => LINK
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => http://www.betta-fish.co.uk/top-10-betta-questions.php
                                                                )

                                                        )

                                                )

                                            [1] => Array
                                                (
                                                    [name] => ITEM
                                                    [attrs] => Array
                                                        (
                                                        )

                                                    [children] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [name] => TITLE
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => How To Breed Betta Fish
                                                                )

                                                            [1] => Array
                                                                (
                                                                    [name] => DESCRIPTION
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Want to know how to breed betta fish ?
                                                                )

                                                            [2] => Array
                                                                (
                                                                    [name] => LINK
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => http://www.betta-fish.co.uk/breeding-betta-fish.php
                                                                )

                                                        )

                                                )

                                            [2] => Array
                                                (
                                                    [name] => ITEM
                                                    [attrs] => Array
                                                        (
                                                        )

                                                    [children] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [name] => TITLE
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Setting Up A Tank For Betta Fish
                                                                )

                                                            [1] => Array
                                                                (
                                                                    [name] => DESCRIPTION
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Learn how to set the tank up and maintain it to keep your betta fish in the best health possible
                                                                )

                                                            [2] => Array
                                                                (
                                                                    [name] => LINK
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => http://www.betta-fish.co.uk/betta-fish-tank.php
                                                                )

                                                        )

                                                )

                                            [3] => Array
                                                (
                                                    [name] => ITEM
                                                    [attrs] => Array
                                                        (
                                                        )

                                                    [children] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [name] => TITLE
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Feeding Your Betta Fish
                                                                )

                                                            [1] => Array
                                                                (
                                                                    [name] => DESCRIPTION
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Learn what to feed your betta fish
                                                                )

                                                            [2] => Array
                                                                (
                                                                    [name] => LINK
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => http://www.betta-fish.co.uk/feeding-your-betta-fish.php
                                                                )

                                                        )

                                                )

                                            [4] => Array
                                                (
                                                    [name] => ITEM
                                                    [attrs] => Array
                                                        (
                                                        )

                                                    [children] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [name] => TITLE
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Betta Fish Diseases
                                                                )

                                                            [1] => Array
                                                                (
                                                                    [name] => DESCRIPTION
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Learn what diseases your betta fish could catch
                                                                )

                                                            [2] => Array
                                                                (
                                                                    [name] => LINK
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => http://www.betta-fish.co.uk/betta-fish-diseases.php
                                                                )

                                                        )

                                                )

                                            [5] => Array
                                                (
                                                    [name] => ITEM
                                                    [attrs] => Array
                                                        (
                                                        )

                                                    [children] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [name] => TITLE
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Betta Fish Compatibility
                                                                )

                                                            [1] => Array
                                                                (
                                                                    [name] => DESCRIPTION
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Find out what other types of fish makes 
                                                                )

                                                            [2] => Array
                                                                (
                                                                    [name] => LINK
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => http://www.betta-fish.co.uk/betta-fish-diseases.php
                                                                )

                                                        )

                                                )

                                            [6] => Array
                                                (
                                                    [name] => ITEM
                                                    [attrs] => Array
                                                        (
                                                        )

                                                    [children] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [name] => TITLE
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => Essential Betta Fish Books
                                                                )

                                                            [1] => Array
                                                                (
                                                                    [name] => DESCRIPTION
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => These books are essential to new betta fish owners
                                                                )

                                                            [2] => Array
                                                                (
                                                                    [name] => LINK
                                                                    [attrs] => Array
                                                                        (
                                                                        )

                                                                    [cdata] => http://www.betta-fish.co.uk/betta-fish-books.php
                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                )

        )

    [returnType] => array
)