O
O
Oleg Osaulenko2015-11-21 11:25:19
PHP
Oleg Osaulenko, 2015-11-21 11:25:19

How to get values ​​from XML code?

I have this code:

<rating>
<kp_rating num_vote="73504">7.12</kp_rating>
<imdb_rating num_vote="234856">7.3</imdb_rating>
</rating>

from it I need to take the value 73504 and 7.12, tell me how can I do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2015-11-21
@miraage

php.net/manual/ru/function.simplexml-load-string.php
php.net/manual/ru/class.simplexmlelement.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question