Jump to content

Php inclusions.


cpugeek

Recommended Posts

okay, so i have the code below.&& i was wondering how do i format things like:making the sidebar on the left & other thingsso do i just use css to format it?or what?

<?php // Include header include("header.php"); // Include sidebar include("sidebar.php"); // Include content if (is_file("$x.php")) { include("$x.php"); } else { include("default.php"); // the default page } // Include footer include("footer.php"); ?>

Link to comment
Share on other sites

Well the first thing you need to do is figure out which thing will go first. You are doing good and including the header.php file first. Now it's just a matter of using the CSS and HTML capabilities to alter how the elements align on the page. Mind you it wouldn't matter if the sidebar.php file was included first or last, as long as the HTML and CSS matched up to include it on the left. Just remember, any text outputted it outputted in the order you include it(again, unless HTML alters it).

Link to comment
Share on other sites

Thanks :). I had a suspicion that's what i needed to do.But what about the smarty template engine?would it be easier to use?Also i have some more questions about the Smarty engine HERE.Any & All help is Appreciated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...