[], 1 => ["brocolli" => .5, "passata" => 1, "spaghetti" => .3], 2 => ["brocolli" => .5, "passata" => 1, "rice" => .3], 3 => [], 4 => ["kale" => .3, "pak choi" => .5, "brocolli" => .5, "rice" => .3, "sweetcorn" => .5, "mangetout" => .5], 5 => ["potatoes" => 5, "beans" => 2], 6 => ["potatoes" => 5, "peas" => .3], 7 => ["egg" => 2, "vesto" => .5, "black beans" => 1, "spaghetti" => .2], 8 => ["instant ramen" => 2, "brocolli" => .5, "sweetcorn" => .5], 9 => ["noodles" => .5, "pak choi" => .5, "brocolli" => .5, "chilli" => .5, "sweetcorn" => .5, "mangetout" => .5, "garlic" => 1 ], 10 => ["tinned tomatoes" => 3, "coconut milk" => 1, "garlic" => .5], 11 => ["squash" => 1, "onion" => 1, "garlic" => .5, "vegetable stock" => .15, "coconut milk" => 1], 12 => ["onion" => 1, "garlic" => .5, "pepper" => 1, "black beans" => 3, "tinned tomatoes" => 1, "vegetable stock" => .15, "lime" => 1], 13 => ["bean burger"=>2, "minced meat" => .25, "chips" => 1, "egg" => 1, "bun" => 4], 14 => ["brocolli" => .5, "passata" => 1, "penne" => .5], 15 => ["chickpea" => 2, "chopped tomato" => 2, "lemon" => 1, "onion" => 2, "garlic" => .5, "ginger" => .5, "chilli" => 1] ]; $GLOBALS["ingredientsList"] = []; $GLOBALS["ingredients"] = []; $GLOBALS["allowance"] = [999,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]; for($i =0;$i<14;$i++){ if ($_POST[$i]==""){ $_POST[$i]=0; } $GLOBALS["allowance"][$_POST[$i]]-=1; } function genSel($dayNum,$meal){ $p = (int)$_POST[$dayNum*2+$meal]; $dm = $dayNum*2 + $meal; $o = ""; } function genRow($dayNum){ return "