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: 'apple', 'b' => 'banana', 'c' => 'cranberry'); echo "a $arr[a] \n"; // apple echo "b {$arr[a]} \n"; // banana (???) echo "c {$arr['a']} \n

[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: 'apple', 'b' => 'banana', 'c' => 'cranberry'); echo "a $arr[a] \n"; // apple echo "b {$arr[a]} \n"; // banana (???) echo "c {$arr['a']} \n"; // apple echo "d $arr[b] \n"; // banana ec