PHP SimpleXML ters

0 Cevap php

Is there any way to loop through an xml loaded in simpleXML in reverse? say if i have the following xml

$string ="<items>
    <item>1</item>
    <item>2</item>
    <item>3</item> 
</items>";

$xml = simplexml_load_string($string);

i foreach yaptığınızda i öğeyi 3 olsun ki $ xml tersine çevirmek için herhangi bir yol yoktur

0 Cevap