mandza
May 15th, 2012, 10:37 AM
i dont know is this right place for asking this, but i need help.
i want to read xml with preg_match_all.
this is my xml structure:
<site>
<st-id>$sitelerl[id]</st-id>
<st-url>$sitelerl[url]</st-url>
<st-puan>$sitelerl[puan]</st-puan>
<st-bayipuan>$sitelerl[bayipuan]</st-bayipuan>
</site>
(this is being repeated)
------------------
i writed preg_match_all like this:
preg_match_all('/<site>(.*?)<\/site>/i',$sonuc,$cikti);
echo $cikti[1][0];
-----------
my question is what i need (.*?) to repleace with so i can pull all data between <site></site> ?????
Thank you a lot.
i want to read xml with preg_match_all.
this is my xml structure:
<site>
<st-id>$sitelerl[id]</st-id>
<st-url>$sitelerl[url]</st-url>
<st-puan>$sitelerl[puan]</st-puan>
<st-bayipuan>$sitelerl[bayipuan]</st-bayipuan>
</site>
(this is being repeated)
------------------
i writed preg_match_all like this:
preg_match_all('/<site>(.*?)<\/site>/i',$sonuc,$cikti);
echo $cikti[1][0];
-----------
my question is what i need (.*?) to repleace with so i can pull all data between <site></site> ?????
Thank you a lot.