XML to PHP array/object

you may need to parse xml file. read the file content to a varaible. if you have PHP5, use following code

$xmlobject = new SimpleXMLElement($xmlstring);

where $xmlstring is the parameter of xml content,
if you dont have PHP5, use the following code

where $xmlstring is the parameter of xml content, if you dont have PHP5, use the following code

$p = @xml_parser_create();
xml_parse_into_struct($p, $xml, $xmlstring, $index);

where $xml is the parameter and $xmlstring is the array which contains the vparsed alues

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s