Chris W. Parker wrote:
> Ford, Mike <mailto:[EMAIL PROTECTED]>
>     on Wednesday, December 08, 2004 5:18 AM said:
>
>>> $sql = "INSERT INTO testTable values ('', '$_POST[testField]')";
>>>
>>> should be
>>>
>>> $var = $_POST["testField"];
>>> $sql = "INSERT INTO testTable values ('', '$var')";
>>
>> Nope -- the original is functionally identical to your suggested
>> correction.
>
> Hmm... I thought arrays don't work correctly within a string unless they
> are wrapped with { and }?

That is a misconception on your part.  Read the manual.  It's quite clear
and concise.

http://www.php.net/manual/en/language.types.string.php

Arrays of MORE THAN ONE DIMENSION will need { and }

One-dimension arrays work just fine without.

-- 
Like Music?
http://l-i-e.com/artists.htm

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

Reply via email to