Created
March 3, 2017 15:51
-
-
Save alepane21/46966cbb6b87ace3965221885a041905 to your computer and use it in GitHub Desktop.
This file contains 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 | |
$data='<data> | |
<seg id="A1"/> | |
<seg id="A2"/> | |
<seg id="A3"/> | |
<seg id="A4"/> | |
<seg id="A5"/> | |
</data>'; | |
$doc=new SimpleXMLElement($data); | |
$seg_ref = $doc->seg; | |
unset($seg_ref->{0}); | |
echo $doc->asXml(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment