Codice PHP:
$arr = array('1','2','3');
$abc implode(","$arr);

$sql "SELECT * FROM tabella WHERE ID IN ($abc)"