-2
<root>
<status>Call Triggered Successfully</status>
<is_ndnc>no</is_ndnc>
<callid>aaac5814-400f-45ea-9235-f0198e5edd4b</callid>
</root>

how can Read nodes i hv to assign to variable like

$status='Call Triggered Successfully';
$is_ndnc='no';
$callid='aaac5814-400f-45ea-9235-f0198e5edd4b';
  • 2
    There are numerous ways to parse/read XML via PHP. Let your fingers do the searching. – ethrbunny Nov 22 '14 at 13:12
  • @rahul Do not put your solution in your question. You can enter and answer just like everybody else. You can even mark it as the correct answer after 2 days. – Jan Doggen Nov 22 '14 at 14:52

1 Answers1

0

There are many ways in which you can gt the nodevalue from xml in php.

You could use xpath which returns an array of SimpleXMLElement objects.

Or you could load the file with simplexml_load_file() and use the foreach loop as explained here

Avinash Babu
  • 6,171
  • 3
  • 21
  • 26