1
0
mirror of synced 2024-12-16 16:16:04 +03:00
doctrine2/manual/codes/Working with objects - Component overview - Collection - Accessing elements.php

16 lines
268 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
$table = $conn->getTable("User");
2006-07-24 01:08:06 +04:00
$users = $table->findAll();
// accessing elements with ArrayAccess interface
$users[0]->name = "Jack Daniels";
$users[1]->name = "John Locke";
// accessing elements with get()
print $users->get(1)->name;
?>