Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8923725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:12:52+00:00 2026-06-15T07:12:52+00:00

I have created a few php files Following are their names: standard_head.php (which contains

  • 0

I have created a few php files Following are their names:

  1. standard_head.php (which contains basic standard html code)
  2. header.php
  3. navbar.php
  4. sidebar.php
  5. footer.php
  6. standard_footer.php (which contains closing html tags)

Page content will vary in every page and would also include html content.

I am trying to create a lot of php pages which will use all of the above pages directly.

Now I can use them directly using include statement for each of them, but I was wondering if it was possible to include all of them together with one just statement ?

<?php include('../includes/standard_head.php'); ?>
        <?php include('includes/header.php'); ?>
            <div id="wrapper">
                <?php include('includes/nav.php'); ?>
                <div id="content">
                <!-- my page content -->
                </div> <!-- end #content -->
                <?php include('includes/sidebar.php'); ?>
            </div> <!-- End #wrapper -->
        <?php include('includes/footer.php'); ?>
<?php include('../includes/standard_footer.php'); ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:12:53+00:00Added an answer on June 15, 2026 at 7:12 am

    You could so this (note that this is a very basic example and that I wouldn’t use this myself without taking into account meta tags, page titles etc.)

    template.php

    <?php include('../includes/standard_head.php'); ?>
    
    <?php include('includes/header.php'); ?>
    
        <div id="wrapper">
    
            <?php include('includes/nav.php'); ?>
    
                <div id="content">
                    <?php echo $content; ?>
                <!-- my page content -->
                </div> <!-- end #content -->
    
            <?php include('includes/sidebar.php'); ?>
    
        </div> <!-- End #wrapper -->
    
        <?php include('includes/footer.php'); ?>
    
    <?php include('../includes/standard_footer.php'); ?>
    

    Then, on a page (say index.php, for example):

    index.php

    <?php
    $content = '<h1>Welcome</h1>';
    include 'template.php';
    ?>
    

    P.S: If you go down this route, make sure that you check out the Output Control Functions first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have setup BPS and have created a few BPEL processes which i can
We have few components like libraries dlls When initially created I ran the following
I've inherited a site with hundreds of scattered HTML and non-framework PHP files, which
hi i created a simple php/mysql/Ajax chat application and I have a few questions.
I have a form in MS access. I have created a few textboxs in
I have created a jar file of few of my classes and preverified them
I have created a tab control and few forms. Each form opens in a
I have a few divs created dynamically in Javascript.I was wondering if it is
I created an Android project a few months ago and now have to automate
I have a modified AppController.php, logins_controller.php, and a few views For knownusers I get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.