Quote:
Originally Posted by jump
This code appears at the top of my "header" before the:
<html> tags.
Code:
<?
$class = array();
if (isset($menu)) {
$class[$menu] = " class=\"selected\" ";
}
if ($menu == "contact")
$class["contact"] = " class=\"selected last\"";
else
$class["contact"] = " class=\"last\"";
?>
Is it important? How can it even be "read" by web browsers if it is before the HTML tags?
|
That looks like PHP - the way it is coded provided shorttags is enabled that code will be run before the page is sent to the browser. The values set in the array are probably being substituted into the HTML lower down in the page and attach classes to the spots where they are being applied that will affect how those parts of the page look.
That code should not be sent to the web browser and so the web browser will not do anything with what it didn't get.