fetch_all(MYSQLI_ASSOC); function getservicebyid($id) { global $services; foreach ($services as $service) { if ($service["id"] == $id) { return $service; } } } ?>