GetRules(); echo_pre($rules->GetHeaderText()); echo '
'; foreach($ruleList as $index => $rule) { echo_rule($index, $rule); } echo '
'; echo_pre($rules->GetFooterText()); function echo_rule($index, HtRule $rule) { $text = (string)$rule; $class = ($index % 2 == 0) ? 'even' : 'odd'; echo <<
Edit Delete
$text
EOT; } function echo_pre($text) { $text = htmlentities($text, ENT_IGNORE, 'UTF-8'); echo << $text EOT; } ?>