array output as a variable?

From: Date: Thu, 12 Apr 2001 06:13:10 +0000
Subject: array output as a variable?
Groups: php.general 
Request: Send a blank email to php-general+get-48250@lists.php.net to get a copy of this message
another newbie programmer question... is it possible to output the results of an array loop into a variable, or directly into an SQL call? Obviously the code below is impossible, but illustrates what I want to do: //declare the array $info_request = array (1 => "firstname","lastname","email","howfound","optin","comments","request_type","request_bucket","date"); //output the array loop results to a variable $array_results = foreach ($info_request As $value) { print "$value,"; } //place the output variable into an SQL call (therefore making it dynamic): INSERT INTO $tablename ($array_results) ... thanks! ----------- providing the finest in midget technology

« previous php.general (#48250) next »