Also I tend to see
<html>
<head>
<title><?php echo $title; ?></title>
// More HTML header information
</head>
<body>
<?php include('header.php');?>
</body>
</html>
In a similar fashion - opening and closing so as not to parse the entire file. But I also know that some developers prefer to open the file: <?php and then not close it...
My question is in your opinions - what is the PROPER, or most preferred way to structure your documents. It can be quite annoying to have 7-8 echo statements, or php calls in a file - but what type of performance hit would parsing the entire document take? Do most professional developers prefer to insert the <?php tags only when necessary?
A lot of this can come down to developer preference, I am more concerned with best practices...

New Topic/Question
Reply



MultiQuote









|