$acc) { if ( str_contains(mb_strtolower($acc['name_ar']), $lowerSearch) || str_contains(mb_strtolower($acc['name_en']), $lowerSearch) || str_contains(mb_strtolower($acc['username']), $lowerSearch) ) { $filteredAccounts[$key] = $acc; } } } else { $filteredAccounts = $allAccounts; } // Pagination logic $page = max(1, (int)($_GET['p'] ?? 1)); $limit = 10; $total = count($filteredAccounts); $totalPages = max(1, ceil($total / $limit)); $offset = ($page - 1) * $limit; $accounts = array_slice($filteredAccounts, $offset, $limit, true); require __DIR__ . '/includes/header.php'; ?>

$account): ?>
POS
1): ?>