0
$m = new MongoClient();
$db = $m->selectDB('twitter');
$collection = new MongoCollection($db, 'status');
$cursor = $collection->find();
foreach ($cursor as $document) {
echo $document['statuses'][0]['text'];
}
アレイ:
Array
(
[_id] => MongoId Object
(
[$id] => 123
)
[statuses] => Array
(
[0] => Array
(
[text] => Tweet no 1
)
[1] => Array
(
[text] => Tweet no 2
)
[1] => Array
(
[text] => Tweet no 3
)
)
)
出力は次のようになります?どのように私は、全体の 'テキスト' 配列を得るのですかいいえ1.
さえずるませんか代わりに 'Tweet no 1、Tweet no 2、Tweet no 3'を返す必要があります。
私はecho $document['statuses']['text']
を試しましたが、動作しません。