How would use use that to in the index.php or in a config file is what I dont understand I dont get how to use that code to open pages like if I have stuff like home.php and I want home.php to open the main content that will be seen on the site when they view it hard to explain in textCode:$pages = array( '' => 'content_home.html', 'links' => 'content_links.html' # etc. ); if (array_key_exists($_GET['content'], $pages)) $page = $pages[$_GET['content']]; else $page = $pages['']; readfile($page);
I was looking for something like I had when Im given something I didn't code I dont understand how its to be used. I dont get where I'd place thet above code and then have it open new pages within the content box like and iframe does but I dont wanna use iframes I wanna do it in php




Reply With Quote