I am quite new to the web development world. I have just finished going through the O'Reilly PHP, Javascript, MySQL, and do have some experience with HTML.
My main question is how do you know whether the document type is supposed to be either .php or .html. Obviosuly I know what each is for but why not just have all the pages a .php extension and outputting the html when necessary. The way I am currently structuring my projects are a .html interface with a .php background that handles the user inputs, etc. However I know that in html documents they typically declare what type of html is being used (4.01, xml, etc.) in the DOCTYPE declaration.
Throughout the O'Reilly no documents used the DOCTYPE declaration and often just output the HTML using the END---END tags.
So my question is bascially, when is the DOCTYPE declaration needed, if at all, and is my website layout typical or is their a more optimal way to structure it.

Help


