P
patrick j
Hi
I'm just exploring the world of PHP and very interesting it is too
Anyway the thing which has interested me initially is putting the
navigation section of the web-site into a separate file to be included in
all the other pages of the web-site.
Very cool is the fact that with some jiggerypokery with a variable I can
have the included navigation identify the "current" link.
This is all described rather well in this article here:
<http://alistapart.com/articles/keepingcurrent/>
However there is one thing which I'm wondering about which in this bit:
You¹ll need to add a unique identifier at the very top
of every page that PHP will understand, ideally
appearing before the HTML tag. You¹ll do this by
creating a variable called $thisPage and assigning a
value that is both descriptive and unique to the
document.
Okay, if I put my <?php $thisPage="Interesting Stuff"; ?> before the HTML
tag does this not put some browsers into quirks mode?
I'm wondering why the author feels it would be ideally located before the
HTML tag, surely it would only have to be in each page before the include
for the navigation section?
Thank you.
I'm just exploring the world of PHP and very interesting it is too
Anyway the thing which has interested me initially is putting the
navigation section of the web-site into a separate file to be included in
all the other pages of the web-site.
Very cool is the fact that with some jiggerypokery with a variable I can
have the included navigation identify the "current" link.
This is all described rather well in this article here:
<http://alistapart.com/articles/keepingcurrent/>
However there is one thing which I'm wondering about which in this bit:
You¹ll need to add a unique identifier at the very top
of every page that PHP will understand, ideally
appearing before the HTML tag. You¹ll do this by
creating a variable called $thisPage and assigning a
value that is both descriptive and unique to the
document.
Okay, if I put my <?php $thisPage="Interesting Stuff"; ?> before the HTML
tag does this not put some browsers into quirks mode?
I'm wondering why the author feels it would be ideally located before the
HTML tag, surely it would only have to be in each page before the include
for the navigation section?
Thank you.