Xml php attribute nested in data



I am working with the following xml SUCCESS An itinerary confirmation e-mail was parsed successfully ....



</ns2:worldmate-parsing-result>


I am trying to access the following data within the xml: xxxxx@me.com yyyyy@me.com


I am trying to do access the second email address using the following code. $endus='end-user-emails'; $endUserEmails=$xml->$endus->attributes()->{'user'}; echo $endUserEmails;


Not sure why but it is forcing met use a variable name, and if I use dashes I get errors.


Thanks for your help. I am new to this!


No comments:

Post a Comment