Bump for you. Maybe somebody will know better than me.
I don't program much, but this might work. Or put you on the right track.
Maybe just declare the output file
$test-sorted = 'test-sorted.xml';
and instead of using echo use file_put_contents
file_put_contents ($test-sorted,$item->username . "<br/>" . $item->person->age . "<br/><br/>", FILE_APPEND | LOCK_EX);
|