Skip to content

Instantly share code, notes, and snippets.

@aminnairi
Created January 18, 2022 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aminnairi/e9d1f7b1dd0c03cb96b0057ab68bad79 to your computer and use it in GitHub Desktop.
Save aminnairi/e9d1f7b1dd0c03cb96b0057ab68bad79 to your computer and use it in GitHub Desktop.
Function Exercise
<?php
$cart = [
[
"product" => "paper",
"quantity" => 7,
"price" => 1.26
],
[
"product" => "pen",
"quantity" => 2,
"price" => 0.12
],
[
"product" => "eraser",
"quantity" => 5,
"price" => 0.89
]
];
$stocks = [
[
"product" => "paper",
"quantity" => 88
],
[
"product" => "handcleaner",
"quantity" => 0
],
[
"product" => "pen",
"quantity" => 34
],
[
"product" => "paperclip",
"quantity" => 11
],
[
"product" => "eraser",
"quantity" => 2
],
[
"product" => "letter",
"quantity" => 53
]
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment