It depends on how you want them to be in the database.  If you want comma-delimited, 
then just use implode().

$array = array("Red", "Blue", "Green");
$comma_seperated = implode(", ", $array);
$space_seperated = implode(" ", $array);

There really is no limit to how you want to do this.  Then just use explode() with the 
same arguments (although replace array with the comma_seperated string) to go back to 
an array.


Martin Clifford
Developer's Forums:

>>> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 07/31/02 08:56AM >>>
i have done as told to select multiple value from a html
form, but i cannot insert all of them into  MySql
it inserts Array into the field, instead of the list of
What can i do?
Is there a special script to insert them?
i tried,
$str = "";
foreach ($tableau as $k=>$v)
$str= $v . " ";
$sjt1=$_POST["sjt1"]; and then the insert command
(among others )but it's always the same story. Please
help, thanks

L'e-mail gratuit pas comme les autres.
NOMADE.FR, pourquoi chercher ailleurs ?

PHP General Mailing List (
To unsubscribe, visit: 

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to