Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php laravel xml to json

$xml = simplexml_load_string($xml_string);
$json = json_encode($xml);
$array = json_decode($json, TRUE);

# Attributes are stored in the array under the @attributes key
 
PREVIOUS NEXT
Tagged: #php #laravel #xml #json
ADD COMMENT
Topic
Name
3+2 =