* 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
+2 -2
View File
@@ -24,9 +24,9 @@ foreach($fields as $fieldName => $fieldLabel)
foreach($rows as $row)
{
echo " <row>\n";
foreach($row as $fieldName => $fieldValue)
foreach($fields as $fieldName => $fieldLabel)
{
$fieldValue = htmlspecialchars($fieldValue);
$fieldValue = isset($row->$fieldName) ? htmlspecialchars($row->$fieldName) : '';
echo " <$fieldName>$fieldValue</$fieldName>\n";
}
echo " </row>\n";