I am making a call to some url : http://example.com/Service.asmx/getTodaysDiscussionForum
which is xml data please see screenshot :
$response = file_get_contents('http://103.1.115.87:100/Service.asmx/getTodaysDiscussionForum');
$response = new SimpleXMLElement($response);
print_r($response);exit;
it display following output :
SimpleXMLElement Object (
[Table1] => Array ( [0] => SimpleXMLElement Object (
[Id] => 1210 [Title] => Test Discussion, Dont Reply [CreatedDate] => 4/25/2014 10:42:49 AM
[Status] => Not Sent )
[1] => SimpleXMLElement Object (
[Id] => 1182 [Title] => Negotiation Skills discussion [CreatedDate] => 4/25/2014 7:47:51 AM
[Status] => Not Sent )
)
)
How can I store each data in a variables ?
I am new to this xml reading thanks in advance
See Question&Answers more detail:os