1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/manual/codes/Basic Components - Collection - Accessing elements.php

16 lines
268 B
PHP

<?php
$table = $conn->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;
?>