how can i get this 2 variables? The $ingredients must get real price from $price, it must get name and price for example TV is amount 3 and price is 20, so it's 60. Here is code.
$ingredients = [
['name' => 'TV', 'amount' => 3],
['name' => 'LAPTOP', 'amount' => 2],
['name' => 'HAREM', 'amount' => 2],
['name' => 'OIL', 'amount' => 1],
['name' => 'Windows', 'amount' => 1],
['name' => 'Something', 'amount' => 1]
];
$prices = [
'TV' => 20,
'LAPTOP' => 20,
'HAREM' => 25,
'OIL' => 20,
'Windows' => 25,
'Something' => 35
];