Use this in your controller action:
$this->set("data", $this->Product->findAll());
Use this in your view:
<?php
foreach ($data as $index=>$prod) { ?>
<tr>
<td><?php echo $prod['Product']['id']; ?></td>
<td><?php echo $prod['Attribute']['id']; ?></td>
</tr>
}
?>
Obviously, you can change the field names to whatever you want to
print. If you
echo "<pre>";
print_r($data);
echo "</pre>";
you will see the structure of the returned array.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---