Re: file( ) function
| From: | Jo�o C�ndido de Souza Neto | Date: | Wed, 07 Jun 2006 19:42:57 +0000 |
| Subject: | Re: file( ) function | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237571@lists.php.net to get a copy of this message | ||
""Rabin Vincent"" <rabin@rab.in> escreveu na mensagem
news:c928c27e0606071229s6728cad5l24c3cf89645ff7bb@mail.gmail.com...
> On 6/8/06, Mayank Maheshwary <mayank.maheshwary@gmail.com> wrote:
>> $name = $_POST["filename"];
>> $lines = file($name);
>> $i = 0;
>> $len = sizeof($lines);
>> //echo $i;
>> while($i < $len) {
>> //echo $lines[$i];
>> $temp = $lines[$i];
>> $temp = trim($temp);
>> //echo $temp;
>> if($temp1 == '--------------------------------------') {
>
> This should be $temp, shoudn't it?
>
>> echo $i;
>> return $i;
>> }
>> else
Else here´s putting you in loop.
>> $i++;
>> }
>
> Rabin