note 22249 added to function.ltrim

From: Date: Wed, 12 Jun 2002 07:38:15 +0000
Subject: note 22249 added to function.ltrim
Groups: php.notes 
Request: Send a blank email to php-notes+get-31726@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 -- http://www.php.net/manual/en/function.ltrim.php http://master.php.net/manage/user-notes.php?action=edit+22249 http://master.php.net/manage/user-notes.php?action=delete+22249 http://master.php.net/manage/user-notes.php?action=reject+22249

« previous php.notes (#31726) next »