Question reg. PHP include code, recommended formating?
Posted: Wed Jan 14, 2004 12:41 am
Hi,
I'm a bit new to PHP and the only command I've been using a lot lately is the include command.
Which way should I write my include statement (see below)? Is there a preferred way? Are there any explicit cons/pros with each?
<?php include "header.htm">
<?include "header.htm"; ?>
BTW: I'm using an .htm extension for the header file, as the php extension gave me problems (I'm also using it as a plain frame in another page).
Please let me know. I'm currently using the latter option, and someone accussed my code of creating "errors".
I'm a bit new to PHP and the only command I've been using a lot lately is the include command.
Which way should I write my include statement (see below)? Is there a preferred way? Are there any explicit cons/pros with each?
<?php include "header.htm">
<?include "header.htm"; ?>
BTW: I'm using an .htm extension for the header file, as the php extension gave me problems (I'm also using it as a plain frame in another page).
Please let me know. I'm currently using the latter option, and someone accussed my code of creating "errors".