note 21438 added to function.fopen

From: Date: Mon, 13 May 2002 12:05:41 +0000
Subject: note 21438 added to function.fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-30579@lists.php.net to get a copy of this message
um exemplo simples que lê cada linha do arquivo e a salva em cada posicao correspondente de uma matriz a partir do indice 1: $arq = "teste.txt"; $i=1; $fd = fopen($arq, "r"); while (!feof($fd)) { $matriz[$i] = fgets($fd, 4096); $i++; } fclose($fd); //imprime na tela os valores ordenados echo '<pre><font face=verdana size=2>'; print_r($matriz); echo '</font></pre>'; :0) Miguel Axcar Bauru, SP, BR -- http://www.php.net/manual/en/function.fopen.php http://master.php.net/manage/user-notes.php?action=edit+21438 http://master.php.net/manage/user-notes.php?action=delete+21438 http://master.php.net/manage/user-notes.php?action=reject+21438

« previous php.notes (#30579) next »