|
|||
|
i installed zf tried some stuff. really impressive how easy some things are working. but there is something i have no idea to solve (without using things like smarty).
lets take this example: i do have 2 tables in my database. first one: - username - name second table: - username (FK) - friendname so every user can have several friends in table 2. when doing just normal php something like that would be fine: Code:
foreach username (table 1)
{
print username;
foreach username (table 2)
{
print friend;
}
}
Code:
$result = $db->fetchALL("select * from usertable");
$this->view->username = $result;
Code:
foreach ($this->username as $user)
{
echo $user['username'] . "<hr>";
}
can anyone help me with this probably basic stuff? thanks alot -andy |
![]() |
| Thread Tools | |
| Display Modes | |
|
|