On Monday, March 11, 2002, at 10:34  PM, Jason Wong wrote:

>>> On Monday 11 March 2002 11:10, Chris Cocuzzo wrote:
>>>> $foo = "Entry for " . $HTTP_POST_VARS["name"];
>>>
>>> $foo = "Entry for for $HTTP_POST_VARS[name]";
>>
>> But that's not good programming.  Associative arrays should have the 
>> key
>> quoted in order to avoid confusion with contants.  See
>> http://www.php.net/manual/en/language.types.array.php#language.types.array.
>> donts
>
> Inside of double-quoted strings there is no need to single-quote the 
> array
> key (in fact it can't be done, gives syntax error). The section of the 
> manual
> you quoted states this :)

I thought that it could be done like so:

$foo = "Entry for {$HTTP_POST_VARS['name']}";





Sorry for butting in,

Erik




----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to