note 93138 deleted from control-structures.switch by aidan
| From: | aidan@php.net | Date: | Tue, 04 May 2010 04:03:42 +0000 |
| Subject: | note 93138 deleted from control-structures.switch by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-168906@lists.php.net to get a copy of this message | ||
Note Submitter: christian dot gahlert at web dot de
----
When using the switch statement you still have to escape your vars like this:
case 'banner':
This also works, but >banner< is interpreted as a constant and as it is not defined an
E_NOTICE is triggered and the constant name it self (='banner') is returned:
case banner:
Just wanted to clarify this, so people don't get a wrong idea.
Christian Gahlert