Re: Array key names - can they be called as strings?

From: Date: Fri, 18 Jul 2003 02:52:01 +0000
Subject: Re: Array key names - can they be called as strings?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-155714@lists.php.net to get a copy of this message
Evan Nemerson <evan@coeus-group.com> wrote: > I kinda skimmed, but I think what you want is > > foreach ( array_keys($SAVEVARS) as $key ) > $query = "update table set $key=$SAVEVARS[$key];"; > should be: $query = "update table set $key='{$SAVEVARS[$key]}';";

« previous php.general (#155714) next »