From 0e3a3a15badc624753ca2bd0d06431ca3c67e52f Mon Sep 17 00:00:00 2001 From: Andrea Date: Fri, 16 Jan 2026 11:30:16 +0100 Subject: [PATCH] Implementazione array lista utenti --- index.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/index.php b/index.php index 0c52083..4c847ac 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,27 @@ id = $id; + $this->name = $name; + $this->email = $email; + } + */ +} +$file = fopen("data/clienti.csv", "r") or die("Non riesco a leggere il file, controlla che esista brutto rimbambito"); +$utenti = []; +fgets($file); +while (($linea = fgets($file)) !== false) { + $campi = explode(",", $linea); + array_push($utenti, new User($campi[0], $campi[1], $campi[2])); +} +fclose($file); ?> +