note 48079 deleted from function.setcookie by tularis
| From: | tularis@php.net | Date: | Sun, 02 Jan 2005 14:12:55 +0000 |
| Subject: | note 48079 deleted from function.setcookie by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82570@lists.php.net to get a copy of this message | ||
Note Submitter: s4t4n at mailinator dot com
----
james at miicro dot net:
> ie. something like
>
> if($_POST["foo"]) {
> $bar = $_POST["foo"];
> } else {
> $bar = $_COOKIE["foo"];
> }
Why oh why such code when something like the following is a) more readable b) shorter!
$bar = $_POST["foo"] or $_COOKIE["foo"];