How does one run an SQL query on multiple items within a PHP array? Firstly, I figured out the SQL "IN". This nifty little statement will allow multiple statements to be declared. Now the difficult part iterating through the entire array. The format is like so (element1,element2,element3,and on into infinifty). The problem is the array can be of an unlimited length. So I devised a weird, and possible bloated solution. < ?php $arr = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); // this is the array $arr_keys = count($arr); // count how many elements for easy formatting $run = 1;//for looping purposes, so we don't start at 0. Which will prevent ",o" - the comma bit $string = $arr[0];// add the first element to prevent ",0" #Now loop through the array until the second to last. To Prvent "16," while($run < $arr_keys) { $string = $string . "," . $arr[$run] ; $run++; } // add the last item and prevent an extra "," $string = $string . $arr[$arr_keys]; // yeah now configure your sql. $sql = "WHERE x IN ($string)"; // add to the sql statement ?>