RE: [PHP] MySQL and Array Problem

From: Date: Wed, 17 Jan 2001 19:03:53 +0000
Subject: RE: [PHP] MySQL and Array Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35113@lists.php.net to get a copy of this message
Never mind, I caught my syntax error it works fine now. Jerry Lake - jerryl@europa.com Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -----Original Message----- From: Jerry Lake [mailto:jerryl@europa.com] Sent: Wednesday, January 17, 2001 10:43 AM To: php-general@lists.php.net Subject: [PHP] MySQL and Array Problem I'm trying to store an array into a MySQL table, what datatype should the column be, Varchar? second this is the code I use to store it. mysql_connect("$DBHost","$DBUser","$DBPass"); $name = implode(",", $name); mysql("$DBName","INSERT INTO CartItems VALUES ('$UID','$ItemID','$ItemQuantity','$all_toppings','$Date','$CartItemsID')"); this works fine, it stores the comma delimited info into the table. however when I extract it and try to count($name) it comes back as 1 and if I try to implode it it says Warning bad argument to implode() and if I do this echo "<font size=-2>".$name."</font>"; $name_test = explode("," $name); echo $name_test; the names item1,item2,item3 is returned, but I get a parse error on the explode, what am I missing...? Jerry Lake -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#35113) next »