Created
January 18, 2022 16:57
-
-
Save aminnairi/e9d1f7b1dd0c03cb96b0057ab68bad79 to your computer and use it in GitHub Desktop.
Function Exercise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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