How would you access the value of ‘seconds’ within this XML code using PHP?
<entry><yt:duration seconds='339'/></entry>
So far I have:
$xml -> entry -> ?!?
For Serty:
<?xml version='1.0' encoding='UTF-8'?>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, what you are looking for is called an attribute. If you are using php to parse your xml, then I would look at http://php.net/manual/en/domelement.getattribute.php, and find a comment that helps you.
Without knowing how you are parsing it though, I can’t help much more