[Php-it] Stringhe nei file di testo
Emiliano Gabrielli (aka AlberT)
AlberT at superalbert.it
Tue Aug 7 12:14:47 CEST 2007
On martedì 7 agosto 2007, Marcello Vezzelli wrote:
> fai un explode qua usando "\n" come separatore, poi fai un foreach
> dell'array che ottieni.
oddio
file restituisce già un array che contiene una riga per ogni entry, l'explode
non serve a nulla, come non serve saltare le righe vuote
$rows = file($file, FILE_SKIP_EMPTY_LINES|FILE_IGNORE_NEW_LINES);
riguardo il caso che non sia presente l' = potrebbe essere trattato come un
semplice $var = NULL (variabile senza un valore) ...
--
<?php echo ' Emiliano Gabrielli (aka AlberT) ',"\n",
' socio fondatore del GrUSP ',"\n",
' AlberT_at_SuperAlberT_it - www.SuperAlberT.it ',"\n",
' IRC: #php,#AES azzurra.com ',"\n",'ICQ: 158591185'; ?>
More information about the Php-it
mailing list