note 107960 added to function.key
| From: | HellFireAE at gmail dot com | Date: | Fri, 16 Mar 2012 23:37:54 +0000 |
| Subject: | note 107960 added to function.key | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186718@lists.php.net to get a copy of this message | ||
I've used this as a way of getting $_GET's from the URL. It's actually quite cool, I
don't know if this is a hack or what but I like it.
<?php
switch(strToLower(key($_GET))){
case "register":
$page->set("{PAGE_TITLE}", "Register");
break;
default:
$page->set("{PAGE_TITLE}", "Play");
break;
}
?>
So if you put "?register" it outputs the page title to "Register" and if it
isn't that, then it's "Play".
Hope this helps people.
----
Server IP: 69.147.83.197
Probable Submitter: 173.62.132.158
----
Manual Page -- http://www.php.net/manual/en/function.key.php
Edit -- https://master.php.net/note/edit/107960
Del: integrated -- https://master.php.net/note/delete/107960/integrated
Del: useless -- https://master.php.net/note/delete/107960/useless
Del: bad code -- https://master.php.net/note/delete/107960/bad+code
Del: spam -- https://master.php.net/note/delete/107960/spam
Del: non-english -- https://master.php.net/note/delete/107960/non-english
Del: in docs -- https://master.php.net/note/delete/107960/in+docs
Del: other reasons-- https://master.php.net/note/delete/107960
Reject -- https://master.php.net/note/reject/107960
Search -- https://master.php.net/manage/user-notes.php