note 76509 deleted from function.array-key-exists by crell
| From: | crell@php.net | Date: | Wed, 29 Jun 2022 20:45:44 +0000 |
| Subject: | note 76509 deleted from function.array-key-exists by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218772@lists.php.net to get a copy of this message | ||
Note Submitter: Lucknut dot xbl at googlemail dot com
----
I found this function very good to use if your want your urls like index.php?login or
index.php?register
e.g.
<?php
if( array_key_exists( 'home',$_GET ) ) {
echo "Home - its where the heart is.";
} else if( array_key_exists( 'login',$_GET ) ) {
echo "Login code here!";
} else if( array_key_exists( 'register',$_GET ) ) {
echo "Register code here!";
} else {
echo "Home - its where the heart is.";
}
?>