note 22249 deleted from function.ltrim by spic

From: Date: Thu, 19 Sep 2002 21:42:26 +0000
Subject: note 22249 deleted from function.ltrim by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36989@lists.php.net to get a copy of this message
i wanted to make an easy template system and ltrim helped alot. basicly i made the site layout then made a content table. now i put <a href="templater.php?dest=games"></a> for my links, that one is to games. then in templater.php i have my site layout and in the designated content table i have <?php $a = ($REQUEST_URI); $av = ltrim($a,"/templater.php?dest="); echo $av; ?> basicly itll just leave me with games. or whatever else i used in dest = . then all i really have to do is <?php include($av.".php"); ?> so then everything, html or php, that was in games.php( or once again whatever i had dest set to in the link) would be put in the content window......its really quite easy. check it out at www.kaffeinated.net, thanx -kaptan. ps.... i recommend keepin a real link to your index, its easiest to have index.php your layout and manually enter the stuff into the content table. for me i have include("updates.php"); and in updates.php i have the news i want on the main page. but if you change the index page at all do the same to the templater page

« previous php.notes (#36989) next »