$query = "select * from cars where ".$searchtype." in ".$searcharray.'";
where $searcharray is created by letting users enter comma separate items....(eg Ford, Ferrari, Porsche) in a textbox
you need to split the textbox data by the comma using the split() function
$array = split(" ",$textboxdata); //split on space
then manipulate the data to place a single quote around each word (eg (final result) $searcharray = ('Ford','Ferrari','Porsche'))
by iterating through the array and changing the data
$x=count($array); //counts the data elements (how many items)
$searcharray = "("; sets the opening bracket for the query
for ($i=0;$x<=$x;$i++){ //arrays are always starting at zero
if ($i<>$x){ //check for the last element as it doesn't need a
//ending comma
$searcharray.="'".$array[$i]."',"; //combines the quotes and
//the data value
}else{
$searcharray.="'".$array[$i]"'"; //last element therefore no
//ending comma
} //end the if statement
} //end the for loop
$searcharray.=")"; //add closing bracket
$sql="select from cars_table where model IN $searcharray";
echo $sql; //use this to test the statement...should read
//select from cars_table where model IN ('Ford','Ferrari','Porsche');
$result = mysql_query($sql);
hth