[thelist] [PHP/MySQL] building a select statement from a mutilple select field

Burhan Khalid thelist at meidomus.com
Mon Aug 1 04:44:55 CDT 2005


On Aug 1, 2005, at 11:16 AM, Kasimir K wrote:

>
>
>> $cities = array('Biloxi','Diamondhead','Gulfport','Lakeshore');
>> $sql = "(".implode(",",$cities).")";
>>
>
> One little thing: remember to include quotes, like this:
>
> $sql = "('" . implode("','" , $cities) . "')";
>
Ah yes, great catch Kasimir :)




More information about the thelist mailing list