Convert XML into Associative Array in PHP: Output

Output 1

{"title":"Student Details","totalStudent":"5","student_records":{"student":[{"name":"Tom","email":"topm@techarise.com","age":"15"},{"name":"Jerry","email":"jerry@techarise.com","age":"17"},{"name":"James","email":"james@techarise.com","age":"14"},{"name":"Wood","email":"wood@techarise.com","age":"16"},{"name":"Adam","email":"adam@techarise.com","age":"18"}]}}

Output 2

Array
(
    [title] => Student Details
    [totalStudent] => 5
    [student_records] => Array
        (
            [student] => Array
                (
                    [0] => Array
                        (
                            [name] => Tom
                            [email] => topm@techarise.com
                            [age] => 15
                        )

                    [1] => Array
                        (
                            [name] => Jerry
                            [email] => jerry@techarise.com
                            [age] => 17
                        )

                    [2] => Array
                        (
                            [name] => James
                            [email] => james@techarise.com
                            [age] => 14
                        )

                    [3] => Array
                        (
                            [name] => Wood
                            [email] => wood@techarise.com
                            [age] => 16
                        )

                    [4] => Array
                        (
                            [name] => Adam
                            [email] => adam@techarise.com
                            [age] => 18
                        )

                )

        )

)