PDA

View Full Version : modular website advice


Noodles24
02-16-2005, 10:03 PM
Hi,

I'm currently building a modular website, i.e. with a template etc. I was just wondering if I was going about it the right way.

At the moment I'm doing something like this:


// on module page
$content = "blah blah blah";
//do some stuff
$content .= $stuff;

include 'template.php';


Then on the template.php page I have:

<html>
<body>
<table>
<tr>
<td>
<?=$content?>
</td>
</tr>
</table>
</body>
</html>


Just a quick and dirty example, but hopefully you get what I'm trying to say

Thanks in advance

bfsog
02-16-2005, 10:45 PM
Yes that is the way to go about it.

However <?=content ?> is a short hand way, your host may not have shorthand expressions turned on.

Try <?php echo $content ?>

Noodles24
02-17-2005, 12:54 AM
Nah it works fine, just wondering if other coders did it this way too. I didn't really want to finish the site and have some other coder come along afterwards and have a bit of a laugh :)

Thanks for your opinion