18 lines
507 B
PHP
18 lines
507 B
PHP
<?php
|
|
// include "functions.php";
|
|
// $id = $_GET['id'];
|
|
// $json = getCustomer($id);
|
|
// $products = json_decode($json, true);
|
|
// $wishlistItems = array_filter($products, function ($product) {
|
|
// return isset($product['favorites']['products']);
|
|
// });
|
|
// echo count($wishlistItems);
|
|
|
|
include "functions.php";
|
|
$id = $_GET['id'];
|
|
$json = getCustomer($id);
|
|
$products = $json;
|
|
$wishlistItems = isset($products['favorites']['products']) ? $products['favorites']['products'] : [];
|
|
echo count($wishlistItems);
|
|
|