Welcome to WebmasterWorld Guest from 22.214.171.124
$array = "green";
$array = "red";
$array = "yellow";
then select all the rows where 'colour' is either red, green or yellow. but preferably without using OR in the query
i hope i've explained this properly....
SELECT * FROM you_table WHERE colour IN ('red','green', 'blue');
To build that query in PHP, you can use the implode function on your array like this:
$sql = "SELECT * FROM your_table WHERE colour IN ('".implode("','", $colour_array)."');";
Of course, make sure your $colour_array is not empty.
The quotes are a little tricky, but this should work.