find('table#sysgrid', 0);
if ($systemsTable) {
foreach ($systemsTable->find('tr') as $row) {
$systemElement = $row->find('a.sysbox', 0);
if ($systemElement) {
$system = $systemElement->plaintext;
$totalGames = $row->find('td', -1)->plaintext;
$href = $baseurl . '/' . $systemElement->href;
$gameSystems[$system] = [
'totalGames' => $totalGames,
'href' => $href
];
}
}
}
// Output the extracted data
echo "Game Systems for User: " . $user . "
";
foreach ($gameSystems as $system => $data) {
$totalGames = $data['totalGames'];
$href = $data['href'];
echo '' . $system . ': ' . $totalGames . "
";
}
} else {
echo "User not found.";
}
}
?>