public function findRecipe($id) { $recipes = $this->toArray(); foreach ($recipes as $recipe) { $recipe['ingredients'] = array(); if ($recipe['id'] == $id) { $ingredients = new ingredients($id); $recipe['ingredients'] = $ingredients->get(); //echo var_dump($recipe); //die(); return $recipe; } } }
public function __construct() { parent::__construct(); $this->ingredient = "Add Green pepper<br />"; }