only store the values in the array.
$array = ('aaa', 'bbb', 'ccc');
mysql_query("SELECT * FROM users WHERE ID IN ('".implode("','", $array)."')");
That will stick the array together and output somethin like:
mysql_query("SELECT * FROM users WHERE ID IN('aaa','bbb','ccc')");
you could leave out the ' if you only use Integers. But anything related to strings needs them in the SQL-statement, thus better use them from the getgo.
If you check for other things, you shoudl sticks thos with and AND or OR depending on how you want to check them and probably put them in different arrays
mysql_query("SELECT * FROM users WHERE ID IN ('".implode("','", $array_1 )."') OR name IN ('".implode("','", $array_2 )."')");
"SELECT * FROM users WHERE ".implode(" OR ",$array)?implode( string $glue , array $pieces )