Salut à tous et bonnes fêtes de fin d'année 
Je souhaite récupérer les données d'un fichier xml, pour cela j'utilise ce code :
Lorsque je fais var_dump($result_array); j'obtiens ce code :
Comment récupérer la valeur 5.93 de ["LENGTH"] ?
J'ai essayé ce type de code mais ça marche pas : print $result_array->{'["LENGTH"]'};
Merci pour votre aide.
Je souhaite récupérer les données d'un fichier xml, pour cela j'utilise ce code :
Code:
$xml = simplexml_load_file($url_fichier);
$json_string = json_encode($xml);
$result_array = json_decode($json_string, TRUE);
Code:
array(3) { ["STATUS"]=> string(7) "SUCCESS" ["ERROR "]=> array(2) { ["ERROR_CODE"]=> array(0) { } ["ERROR_MSG"]=> array(0) { } } ["REPORT 1"]=> array(1) { ["REPORT2 "]=> array(101) { ["MESSAGE"]=> array(0) { } ["LENGTH"]=> string(21) "5.93 " ["WIDTH"]=> string(21) "5.97 " ["DEPTH"]=> string(21) " 3.70 " etc... } } }
J'ai essayé ce type de code mais ça marche pas : print $result_array->{'["LENGTH"]'};
Merci pour votre aide.