次のコードを使用して、表示されているxmlからすべてのノードを出力します。
$cursor = "?cursor=-1"
$xml= new SimpleXmlElement($to->OAuthRequest('http://twitter.com/statuses/followers.xml?$cursor'));
foreach ($xml->xpath('/users_list/users/user') as $user) {
$id = $user->id;
$names .= $user->screen_name;
$profimg = $user->profile_image_url;
}
$next = $user->next_link;
$prev = $user->prev_link;
$pusharray = array("$names", "$next", "$prev");
私が取り戻すのはArray ( [0] => [1] => [2] => )
これがxmlのサンプルです
http://twitter.com/statuses/followers/barakobama.xml?cursor=-1
私は何が間違っているのですか?誰もが提案したすべてがうまくいきませんでした!私は非常識になります。