PHP:CSV
De WikiMar
<syntaxhighlight lang="php"> if (is_file($file)) {
$file_handle = fopen($file, "r");
$row = 0; while (($liniaEntrada = fgetcsv($file_handle, 2000, ",", '"')) !== FALSE) { $row++; $num = count($liniaEntrada); if ($num > 30) //number of columns expected { ... } } fclose($file_handle);
}
</syntaxhighlight>