Re: Array key names - can they be called as strings?
| From: | Chris Shiflett | Date: | Thu, 17 Jul 2003 21:55:18 +0000 |
| Subject: | Re: Array key names - can they be called as strings? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155692@lists.php.net to get a copy of this message | ||
--- Mike Morton <mike@webtraxx.com> wrote:
> Forach($SAVEVARS as $whatever) {
> $query="update table set $whatever=$whatever[$whatever]";
> }
Use braces:
$query = "update table set $whatever = '{$whatever[$whatever]}'";
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/