Last active
August 3, 2019 12:49
-
-
Save fl3xice/40016e319450db5f58d601a43513d4a4 to your computer and use it in GitHub Desktop.
Урок Как парсить XML файлы
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
## Урок как парсить XML файл? | |
## Вся информация была получена с сайта php.net | |
$xmlstring = file_get_contents("file.xml"); | |
$xml = simplexml_load_string($xmlstring); | |
print_r($xml); | |
$jsonXML = json_encode($xml); | |
$xml = json_decode($jsonXML, true); | |
echo "<br>"; | |
echo "<br>"; | |
echo "<br>"; | |
echo "<br>"; | |
echo "<br>"; | |
echo "<br>"; | |
print_r($xml); | |
//echo $xml['b']['line'][1]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment