Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $xml= '<goods>
- <good sh="1235643" name="qwezxc" ed="dsa" cost="98754"/> <good sh="123" name="qwe" ed="oopopop" cost="123456"/>
- <good sh="1235643" name="qwezxc" ed="dsa" cost="98754"/> <good sh="123" name="qwe" ed="oopopop" cost="123456"/>
- <good sh="1235643" name="qwezxc" ed="dsa" cost="98754"/> <good sh="123" name="qwe" ed="oopopop" cost="123456"/>
- <good sh="1235643" name="qwezxc" ed="dsa" cost="98754"/> <good sh="123" name="qwe" ed="oopopop" cost="123456"/>
- <good sh="1235643" name="qwezxc" ed="dsa" cost="98754"/> <good sh="123" name="qwe" ed="oopopop" cost="123456"/>
- <good sh="1235643" name="qwezxc" ed="dsa" cost="98754"/> <good sh="123" name="qwe" ed="oopopop" cost="123456"/>
- <good sh="1235643" name="qwezxc" ed="dsa" cost="98754"/> <good sh="123" name="qwe" ed="oopopop" cost="123456"/>
- <good sh="1235643" name="qwezxc" ed="dsa" cost="98754"/> <good sh="123" name="qwe" ed="oopopop" cost="123456"/>
- </goods>';
- $xml = simplexml_load_string($xml);
- //var_dump($xml);
- foreach ($xml->children() as $good){ //получаем контейнер goods
- var_dump($good);
- //sql здесь
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement