[PHP-DEV] Constants inside strings, sometimes

2002-12-17 Thread Philip Olson
Hello, I stumbled upon this feature today and am wondering why it exists: ?php error_reporting(E_ALL); ini_set('display_errors', 1); define('a', 'b'); $arr = array('a' = 'apple', 'b' = 'banana', 'c' = 'cranberry'); echo a $arr[a] \n; // apple echo b {$arr[a]} \n;

Re: [PHP-DEV] Constants inside strings, sometimes

2002-12-17 Thread Andi Gutmans
At 05:16 PM 12/17/2002 +, Philip Olson wrote: Hello, I stumbled upon this feature today and am wondering why it exists: ?php error_reporting(E_ALL); ini_set('display_errors', 1); define('a', 'b'); $arr = array('a' = 'apple', 'b' = 'banana', 'c' = 'cranberry');