Easy PHP page include
When you change 1 thing in your HTML layout, you mostely have to change it in most of your pages, here's a quick way to fix that problem.
insert where your content needs to be the following code
switch($_GET['page']{
case "Home":
include("inc/home.php");
break;
case "Profile":
include("inc/profile.php");
break;
default:
include("inc/home.php");
break;
}
now you just have to change 1 time your layout, and it will be corrected on all the pages, YEAY :)
Written by Glenn Latomme
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#