E per il fatto che me lo fa anche in lettura?
Codice PHP:
<? $var=file('clienti/clienti.txt'); ?>
<TABLE width="40%" border="1" class="p1">
<caption>Elenco Clienti</caption>
<thead>
<tr>
<th width="10%">Codice</th>
<th width="60%">Nome</th>
<th width="30%">Partita IVA</th>
</tr>
<? for($r=0;$r<count($var);$r++) {
$var[$r]=explode(";",$var[$r]);?>
<tr align="center">
<th width="10%"><input maxLength="10" size="10" disabled="disabled" value=<? echo $var[$r][0]; ?> type="text"></th>
<th width="60%"><input maxLength="40" size="40" disabled="disabled" value=<? echo $var[$r][1]; ?> type="text"></th>
<th width="30%"><input maxLength="10" size="10" disabled="disabled" value=<? echo $var[$r][2]; ?> type="text"></th>
</tr>
<?}?>
Il file contiene
10001;Edicola;1234567891;
10002;Costa Adriatica;1234567890;
Mi visualizza
Edicola
Costa
senza Adriatica..