How can I put all includes on one page with classes?

Floris

For a school project I need to put all returning code into an include. I want it all on one page, but I can't get it to work. Creating an include is no problem, but I want them all in one PHP page. I have the following code, but it is wrong:

//footer
<?php

class footer
{
echo '<a href="login.php">Account</a>';
echo '<a href="subscription.php">Subscription</a>';
echo '<a href="about.php">About us</a>';
echo '<a href="termsofuse.php">Terms of Use</a>';
echo '<small>&copy; 2017, (myname)  &  (name partner)</small>';
}
?>

How do I have to modify the code, so that it is correct?

Serrano

Assign the html code to variables.

<?php $footer = "<a href="login.php">Account</a>
                 <a href="subscription.php">Subscription</a>
                 <a href="about.php">About us</a> 
                 <a href="termsofuse.php">Terms of Use</a>
                 <small>&copy; 2017, (myname)  &  (name partner)</small>"
?>

After that you only need to include the one PHP file and <?php echo $footer ?> for all parts of your page

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I put one label with time on all of my screens

From Dev

Can I have one page for all profiles?

From Dev

How can i put a circle in the middle of the page

From Dev

How can I put items of different sizes in one page avoiding too many gaps between them?

From Dev

How Can I put all my If statement in only one class or function?

From Dev

How can I put functions in different files, but get them all with just one import?

From Dev

How can I get all the files from one git branch, and put them into the current branch without merging?

From Dev

How can I put all dependencies into one folder inside a JAR file with Maven?

From Dev

ASP:NET MVC: How can I render two styles in one page without any overlaps of CSS classes?

From Dev

How can I efficiently access members from inner classes using instances of a class which includes inner classes?

From Java

How many classes should I put in one file?

From Dev

How can I put "sub-classes" in a class

From Dev

how can i click another page's link which includes functions in current page

From Dev

why does keras model.predict only return one probability?How can I output all probabilities of all the classes?

From Dev

How can I pause all playing VideoJS instances on page when one is started?

From Dev

How to set "DT::renderDataTable" that I can copy or print all of the table not noly one page?

From Dev

How can I declare this variable if it can be one of three different classes?

From Dev

How can I put the result of the counter into the cards on top of an html page?

From Dev

How can I put a login page on my website using PHP

From Dev

How can I put a video as a the background of the page in css/html?

From Dev

How can I consecutively implement contradicting css classes in one javascript function to create a fade in/fade out effect on a page?

From Dev

How I can put one space before and after list elements?

From Dev

How can I put one or multiple echo inside other echo?

From Dev

How can I put two strings in one print function?

From Dev

How many folders can I put in one Windows folder?

From Dev

How can I choice data is put to model or one is not do to it?

From Dev

How can I apply put one event listener of the other?

From Dev

How can I put two ngFor in one div

From Dev

How can I put one value in another list?

Related Related

  1. 1

    How can I put one label with time on all of my screens

  2. 2

    Can I have one page for all profiles?

  3. 3

    How can i put a circle in the middle of the page

  4. 4

    How can I put items of different sizes in one page avoiding too many gaps between them?

  5. 5

    How Can I put all my If statement in only one class or function?

  6. 6

    How can I put functions in different files, but get them all with just one import?

  7. 7

    How can I get all the files from one git branch, and put them into the current branch without merging?

  8. 8

    How can I put all dependencies into one folder inside a JAR file with Maven?

  9. 9

    ASP:NET MVC: How can I render two styles in one page without any overlaps of CSS classes?

  10. 10

    How can I efficiently access members from inner classes using instances of a class which includes inner classes?

  11. 11

    How many classes should I put in one file?

  12. 12

    How can I put "sub-classes" in a class

  13. 13

    how can i click another page's link which includes functions in current page

  14. 14

    why does keras model.predict only return one probability?How can I output all probabilities of all the classes?

  15. 15

    How can I pause all playing VideoJS instances on page when one is started?

  16. 16

    How to set "DT::renderDataTable" that I can copy or print all of the table not noly one page?

  17. 17

    How can I declare this variable if it can be one of three different classes?

  18. 18

    How can I put the result of the counter into the cards on top of an html page?

  19. 19

    How can I put a login page on my website using PHP

  20. 20

    How can I put a video as a the background of the page in css/html?

  21. 21

    How can I consecutively implement contradicting css classes in one javascript function to create a fade in/fade out effect on a page?

  22. 22

    How I can put one space before and after list elements?

  23. 23

    How can I put one or multiple echo inside other echo?

  24. 24

    How can I put two strings in one print function?

  25. 25

    How many folders can I put in one Windows folder?

  26. 26

    How can I choice data is put to model or one is not do to it?

  27. 27

    How can I apply put one event listener of the other?

  28. 28

    How can I put two ngFor in one div

  29. 29

    How can I put one value in another list?

HotTag

Archive