Originally posted by Sxooter
Assuming you have something like:
$hostfield = array(1,2,3,4,5);
$query = "select * from table where id in ("';
$query.= implode("','",$hostfield);
$query.= "')";
print $query;
[/B]
little change🙂 is maybe better....
$hostfield = array(1,2,3,4,5);
$query = "select * from table where id in ('";
$query.= implode("','",$hostfield);
$query.= "')";
print $query;
hth