Wednesday, 14 November 2018

Extract certain data from XML file using PHP

I have an XML file that contains information about some clients, each client has a name, phone number and address in the same tag.
The XML code like the following:






    address="092111111" 
date="1537877656607"
type="2"
subject="null"
body="0913334444 Ali MAPS.ME! ge0://wyOxQI835m"
toa="null"
sc_toa="null"
service_center="null"

read="1"
status="0"
locked="0"
date_sent="0" />
address="092111111"
date="1537877656607"
type="2"
subject="null"
body="0913334444 Khaled MAPS.ME! ge0://wyOxQI835m"

toa="null"
sc_toa="null"
service_center="null"
read="1"
status="0"
locked="0"
date_sent="0" />





My question is: how to extract each client's information from tag?



Thank you!

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...