SyntaxFix
Write A Post
Hire A Developer
Questions
$SQL_Part="(" $i=0; while ($i<length($cat)-1) { $SQL_Part+=$cat[i]+","; } $SQL_Part=$SQL_Part+$cat[$i+1]+")" $SQL="SELECT * FROM products WHERE catid IN "+$SQL_Part;
It's more generic and will fit for any array!!