Php help
Out of context: Reply #4
- Started
- Last post
- 17 Responses
- Claymantis0
// Print website header
function printHeader() {global $quotes;
global $sections;
global $section_total;
global $current_file;
global $section_img_dir;for ($i = 0; $i < $section_total; $i++) {
if (!$current) {
if (preg_match("/$sections[$i]/", $current_file)) {
$current = "$sections[$i]";
} // End if
if (preg_match("/form/", $current_file)) {
$current = 'admissions';
$sub = 'form';
} // End if
} // End if$preload .= "'images/menu_" . $sections[$i] . "_on.gif'";
if ($i != $section_total) {
$preload .= ',';
} // End if$menu .= "<li id=\"" . $sections[$i];
if ($sections[$i] == $current) {
$menu .= "\" class=\"active\">";
} else {
$menu .= "\"><a href=\"" . $sections[$i] . ".php\"></a>";
} // End if$menu .= "";
} // End for