1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/manual/docs/Basic Components - Collection - Adding new elements.php
2006-08-22 18:36:34 +00:00

7 lines
316 B
PHP

When accessing single elements of the collection and those elements (records) don't exist Doctrine auto-adds them.
<br \><br \>
In the following example
we fetch all users from database (there are 5) and then add couple of users in the collection.
<br \><br \>
As with PHP arrays the indexes start from zero.