XML Php

$sx = simplexml_load_file('address-book.xml');
foreach ($sx->person as $person) {
    $firstname_text_value = $person->firstname;
    $lastname_text_value = $person->lastname;
    
    print "$firstname_text_value $lastname_text_value\n";
}
//


    
        D
        S
        New York
        NY
        s@php.net
    
    
        A
        T
        San Francisco
        CA
        a@php.net