Jump to content

Convert array to comma separated string


newb

Recommended Posts

this worked better:

    foreach ($maintypes as $type) {
     $wheretype .= "'$type'";
    }
    $wheretype = str_replace("''", "', '", $wheretype);
    $typesetting = @mysql_query("SELECT batch, quantity FROM batches WHERE type NOT IN ($wheretype) ORDER BY batch"); 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.