Assigning a variable to a file

Hello everyone,

I am trying to achieve something very simple.

I have a footer.php file which I would like to include() into my index.php


        <li><a href="#">About Us</a></li>
        <li><a href="#">Financing</a></li>
        <li><a href="#">Contact Us</a></li>

Currently, I am including the footer into my index.php using the following method:

include ("includes/footer.php");

As you can see, I am repeating “includes/php” twice. I figured that it is easier to assign this file as a variable, so I may use the following code instead:

include ($footer);

But I have no idea how to assign a file as a variable. Thanks for any tips.

In this case, $footer = ‘includes/footer.php’; is all you need

Thank you, Tim.