Here is my PHP code
$xml= new SimpleXmlElement($rawxml);
foreach($xml->children()->children() AS $key){
$id = $xml->{"id"};
$name = $xml->{"screen_name"};
$profimg = $xml->{"profile_image_url"};
echo "$id, $name, $profimg";
}
$next = $xml->{"next_link"};
echo "index.php?".$next;
Here is the structure of my xml
<?xml version="1.0" encoding="UTF-8"?>
<users_list>
<users type="array">
<user>
<id>44444</id>
<screen_name>Some Name</screen_name>
<profile_image_url>http://www.website.com/picture.jpg</profile_image_url>
</user>
<user>
<id>555</id>
<screen_name>Bob</screen_name>
<profile_image_url>http://www.website.com/picture2.jpg</profile_image_url>
</user>
<user>
<id>666666</id>
<screen_name>Frank</screen_name>
<profile_image_url>http://www.website.com/picture3.jpg</profile_image_url>
</user>
</users>
<next_link>44444</next_link>
</users_list>
Im trying to assign the values of the field to variables and then echo them. Then at the bottom echo the nextlink.
I dont get any errors, but it just shows the first field over and over, and doesnt output the nextlink.