1
0
mirror of synced 2025-01-18 22:41:43 +03:00
doctrine2/manual/codes/Basic Components - Collection - Accessing elements.php

16 lines
271 B
PHP
Raw Normal View History

2006-07-23 21:08:06 +00:00
<?php
$table = $session->getTable("User");
$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;
?>