Want to Reuse the same Menu or Navbar in Multiple pages, but use only HTML?
Well, the Solution is Simple, Just one line of PHP Code does this task!
Let’s suppose a Main HTML page called index.html.
It contains the following Code:
<!DOCTYPE html>
<html>
<title>HTML Page</title>
<body>
<ul>
<li>Home</li>
<li>About Us</li>
<li>Contact Us</li>
</ul>
<h1>HOME PAGE</h1>
</body>
</html>
Let’s Suppose you want to Reuse the code under the <ul> element.
Copy the code and paste it in a file, save it as menu.php.
Now replace the <ul> element in the index.html page with this:
<?php include ‘menu.php’ ?>
Save the index.html file as index.php.
Now run it on a Website/Web Server or Local Machine Server.
You will see the Menu appear!
(Prank) How to Shutdown PC with Timer.
(Virus-Protection) How to Protect yourselves from Macro Viruses.