I sure would like this problem to be solved. When I try to parse the simple xml, I don't get any output at all, not even an error message.
I spend a couple of days playing with the codes given in this thread but still don't get the comma's between the 'actors'. I tried the code:
<?php
$data = file_get_contents("XML URL");
$actors = preg_match_all("/<actors>(.+)<\/actors>/", $data, $match);
$str = implode(", ", $match[1]);
echo $str; //echos actor#1, actor #2, actor #3
?>
I think this should work but the preg match is not like it should be because the xml takes all the content between <actors></actors> and because the individual actors are also tagged it doesn't get it right:
<actors>
<actor id="1234">Actor #1</actor>
<actor id="12345">Actor #2</actor>
<actor id="123456">Actor #3</actor>
</actors>
I tried the preg match:
$actors = preg_match_all("/<actor>(.+)<\/actor>/", $data, $match);
But this doesn't give any output nor error messages. Anybody an idea how to get this right?