note 81557 rejected from language.constants by ezyang
| From: | ezyang@php.net | Date: | Tue, 04 Mar 2008 04:10:43 +0000 |
| Subject: | note 81557 rejected from language.constants by ezyang | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-136716@lists.php.net to get a copy of this message | ||
Note Submitter: mws
----
Why is this a syntax error?
define('DIGITS', '2345678');
$n = 3;
echo DIGITS[$n];
but this is not,
$DIGITS = '2345678';
$n = 3;
echo $DIGITS[$n];