Código PHP:
<table id="main">
<tr><th id="table-title" colspan="3">Proyecto</th></tr>
<tr><th>PROY</th><th>CLIENTE</th><th>Jefe</th></th></tr>
<?php
$findCommand =& $fm->newFindAllCommand('Control_Proyecto');
$result = $findCommand->execute();
if (FileMaker::isError($result)) {
echo "Error: " . $result->getMessage() . "\n";
exit;
}
$records = $result->getRecords();
foreach ($records as $record) {
$lista_de_colores=array("#ffffff","#ccffff","#cc99ff","#e1c7e1","#bde6e1","#33cccc","#ff0000");
$color=$lista_de_colores[$record->getField('COLOR')];
if ($record->getField('COLOR') != 0){
echo "<tr bgcolor=\"$color\">";
}
else{
echo "<tr>";
}
echo "<td>".$row."</td>";
echo "<td class=\"align-left\"><a href=\"verRegistro.php?recid=" . $record->getRecordId() . "\">" . $record->getField('ID_PROYECTO') . "</td>";
echo "<td>" . $record->getField('PROYECTO') . "</td>";
echo "<td>" . $record->getField('CLIENTE') . "</td>";
echo "<td>" . $record->getField('JEFE_PROYECTO') . "</td>";
echo "</tr>";
}
?>
<tr><td colspan="3"></tr>
</table>