Subscribe
<? php
//the incoming variable is called "$action"
switch($action){
case "bookmarks":
//include your bookmarks file
break;
case "clippings":
//include your clippings file
break;
case "photos":
//include your photos file
break;
default:
//in case action doesn't equal any of those things
break;
}
?>
Oh, so this isn't your own source?That line is from the poster of the question. The array shift / array keys / switch block I wrote. Because they were blackbox functions with weird ass syntax I didn't want to mess with it.
$pageName = key($_GET); thing does. I figured I'll take a proper look at it rather than sending you round in circles—recoding now…You are not logged in, either login or create an account to post comments
How about the following:
if(!empty($bookmarks)) include "bookmarks.php";
if(!empty($clippings)) include "clippings.php";
if(!empty($links)) include "links.php";
if(!empty($photos)) include "photos.php";
$flag = false;
if( !empty($bookmarks) || !empty($clippings) || !empty($links) ||
!empty($photos)) $flag == true;
...
posted by thanotopsis at 12:26 PM on January 4, 2006