1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/manual/docs/Working with objects - Component overview - Collection - Getting collection count.php

12 lines
257 B
PHP
Raw Normal View History

2006-08-22 22:36:34 +04:00
The Doctrine_Collection method count returns the number of elements currently in the collection.
<code type="php">
$users = $table->findAll();
$users->count();
// or
count($users); // Doctrine_Collection implements Countable interface
</code>