Log 3742
08/08/2024 2024-08-08 10:48$transactions = array(
array(‘customer’ => ‘John’, ‘transaction_type’ => ‘purchase’),
array(‘customer’ => ‘Alice’, ‘transaction_type’ => ‘refund’),
array(‘customer’ => ‘John’, ‘transaction_type’ => ‘purchase’),
array(‘customer’ => ‘Bob’, ‘transaction_type’ => ‘purchase’),
);
$count = 0;
foreach ($transactions as $record) {
if ($record[‘customer’] === “John”) {
$count++;
}
}
return $count;