I'm getting 2 fields from my html form which store the value in an Array.
$ingredients = $_POST['ingredients'];
$quantity = $_POST['quantity'];
I want to insert these 2 value to my mysql db. So I'm using following:
foreach($ingredients as $in)
{
foreach($quantity as $q)
{
echo "Intredent and quantity is : $in and $q<br/>";
//$insert = my mysql Insert query;
}
}
But it showing twice value. For ex: if it's 2 value it's showing 4 value.. etc.