Re: What's wrong with this IF statement?
| From: | Richard Davey | Date: | Thu, 22 Apr 2004 19:13:57 +0000 |
| Subject: | Re: What's wrong with this IF statement? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184271@lists.php.net to get a copy of this message | ||
Hello Robert,
Thursday, April 22, 2004, 8:02:55 PM, you wrote:
RS> $cat_id = $cats[id_num];
Try this:
$cat_id = $cats['id_num'];
You need to quote array elements otherwise PHP expects a constant.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html