Re: Difference between $_POST[foo] and $_POST['foo']?
| From: | Justin French | Date: | Tue, 17 Jun 2003 10:42:34 +0000 |
| Subject: | Re: Difference between $_POST[foo] and $_POST['foo']? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151811@lists.php.net to get a copy of this message | ||
on 17/06/03 6:09 PM, Jarmo Järvenpää (Jarmo.Jarvenpaa@softers.net) wrote:
> Hi
>
> A quickie, how does the $_POST[foo] and $_POST['foo'] differ?
> Both do work.
$_POST[foo] will look for a pre defined constant foo.
Under certain error-reporting levels, this will generate an notice/warning,
and it assumes you mean 'foo'.
$_POST['foo'] is correct, and will not generate errors.
Justin