| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
MongoDB\Driver\Cursor::toArray(mongodb >=1.0.0) MongoDB\Driver\Cursor::toArray — Returns an array containing all results for this cursor 説明
final public array MongoDB\Driver\Cursor::toArray
( void
)
Iterates the cursor and returns its results in an array. MongoDB\Driver\Cursor::setTypeMap() may be used to control how documents are unserialized into PHP values. パラメータこの関数にはパラメータはありません。 返り値Returns an array containing all results for this cursor. エラー / 例外
例例1 MongoDB\Driver\Cursor::toArray() example
<?php 上の例の出力は、 たとえば以下のようになります。 array(3) { [0]=> object(stdClass)#6 (2) { ["_id"]=> object(MongoDB\BSON\ObjectId)#5 (1) { ["oid"]=> string(24) "564259a96118fd40b41bcf61" } ["x"]=> int(1) } [1]=> object(stdClass)#8 (2) { ["_id"]=> object(MongoDB\BSON\ObjectId)#7 (1) { ["oid"]=> string(24) "564259a96118fd40b41bcf62" } ["x"]=> int(2) } [2]=> object(stdClass)#10 (2) { ["_id"]=> object(MongoDB\BSON\ObjectId)#9 (1) { ["oid"]=> string(24) "564259a96118fd40b41bcf63" } ["x"]=> int(3) } } 参考
|
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「MongoDB\Driver\Cursor::toArray - Returns an array containing all results for this cursor」をGoogle検索
|