note 15141 added to function.define
| From: | ste at opk dot no | Date: | Wed, 29 Aug 2001 14:41:50 +0000 |
| Subject: | note 15141 added to function.define | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17302@lists.php.net to get a copy of this message | ||
To use a constant to show an element of an array inside a string:
define ('C', 0); print ("element 0: {$a[C]}");
The { & } around the variable signals that what's inside should be treated as a variable
and not a string.
Note that 'print ("a constant:{C}");' wont work as ZERO is a constant.
http://www.php.net/manual/en/function.define.php