Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function add($product, $count)
- {
- $array = json_decode('
- [{
- "product": "test-search",
- "count": "2"
- }, {
- "product": "example-3",
- "count": "2"
- }, {
- "product": "example-2",
- "count": "3"
- }, {
- "product": "example-1",
- "count": "4"
- }]
- ');
- $product = [
- 'product' => $product,
- 'count' => $count
- ];
- array_unshift($array, $product);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement