optimized for loops with count() function calls

This commit is contained in:
mohrt
2002-06-03 16:05:33 +00:00
parent f1d75e32c8
commit 51a14712f8
11 changed files with 40 additions and 29 deletions

View File

@@ -29,7 +29,7 @@ function smarty_function_html_options($params, &$smarty)
} else {
settype($output, 'array');
settype($values, 'array');
for ($i = 0; $i < count($output); $i++) {
for ($i = 0, $for_max = count($output); $i < $for_max; $i++) {
/* By default, check value against $selected */
$sel_check = $values[$i];
$html_result .= "<option";