1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/manual/codes/Basic Components - Record - Accessing properties.php

22 lines
320 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
$user = $table->find(3);
// access property through overloading
$name = $user->name;
// access property with get()
$name = $user->get("name");
// access property with ArrayAccess interface
$name = $user['name'];
// iterating through properties
foreach($user as $key => $value) {
}
?>