Users select some parameters with checkboxes from an HTML form:
Example: they choose eggs, carrots and beans from 100 possible ingredients.
These selected parameters are stored in an array such as $ingredients['eggs','carrots','beans'];
A mysql query has to input name results where eggs=1, carrots=1, and beans=1
$db->query("SELECT name, FROM ingredients WHERE eggs=1, carrots=1, beans=1")->fetchall();
But how if I have $ingredients has a different size?
Thanks for your help.