<?php

require_once('bootstrap.php');

$conn = Doctrine_Manager::connection(DSN);

$Person = Doctrine_Core::getTable('Person')->find(1);

echo ("Name: " . $Person->name . "<br>");
echo ("Address: " . $Person->address . "<br>");

?>
Owned Cars:
<table width="50%" border="1">
  <tr>
    <td><strong>Brand</strong></td>
    <td><strong>Model</strong></td>
  </tr>
<?php
   $Cars = array();
   $cars = $Person->cars->getData();
   
   foreach ($cars as $car) {
?>
    <tr><td>
<?php
     echo($car->brand);
?>
    </td><td>
<?php
     echo($car->model);
?>
    </td></tr>
<?php       
   }
?>
  </tr>
</table>