* print fields according to the config order.

This commit is contained in:
wangchunsheng
2011-05-03 03:59:05 +00:00
parent f09dd186f7
commit fa5c5c0d57
3 changed files with 13 additions and 6 deletions
+4 -3
View File
@@ -30,10 +30,11 @@ table, th, td{font-size:12px; border:1px solid gray; border-collapse:collapse;}
<?php
foreach($rows as $row)
{
echo "<tr>\n";
foreach($row as $fieldName => $fieldValue)
echo "<tr valign='top'>\n";
foreach($fields as $fieldName => $fieldLabel)
{
echo "<td>$fieldValue</td>\n";
$fieldValue = isset($row->$fieldName) ? $row->$fieldName : '';
echo "<td><nobr>$fieldValue</nobr></td>\n";
}
echo "</tr>\n";
}