I am taking multiple values from user from a drop down list. I stored those values in an array in php. Everything is fine. Now I want to use these array values to query my database to give the desired results. My html code is
<select multiple name="equipment[]">
<option value="all">ALL</option>
<option value="helmet">HEMLMET</option>
<option value="boots">BOOTS</option>
<option value="jacket">JACKET</option>
<option value="flask">FLASK</option>
</select>
$equipment=$_POST['equipment'];
I used this piece to store values.
Now based on one or more values in the array; I want filter my query.
Select w,x,y,z from table_a inner join table_b where table_a.w="the values in array";
I tried using foreach to loop through, but its taking only the last value. thank you for your help.