Re: [PHP] read file From: Alberto Mucignat (stain <email protected>)
Date: 11/23/01

Il ven, 23 nov 2001, hai scritto:
> hi,
> andrey hristov told me how to read a file and put it into a table (thx)
> but now i see that i need the data in an array.
> can somebody help me please?

just use the first line of Andrey:

$content = file('file_name.txt');

file function reads entire file into an array (from the manual).

bye, alberto.

 
> thx
>
> On Friday 23 November 2001 10:16, Andrey Hristov wrote:
> > $content = file('file_name.txt');
> > $HTML .='<table>';
> > foreach ($content as $v){
> > $HTML .='<tr><td>'.$v.'</td></tr>';
> > }
> > $HTML .='</table>';
> > echo $HTML;
> >
> > Regards
> > Andrey Hristov
> > IcyGEN Corporation
> > http://www.icygen.com
> > BALANCED SOLUTIONS
> >
> >
> > ----- Original Message -----
> > From: "PHP Newbie" <thomas.fischbach <email protected>>
> > To: <php-general <email protected>>
> > Sent: Friday, November 23, 2001 11:00 AM
> > Subject: [PHP] read file
> >
> > > hi,
> > > i have a file with ips inside
> > >
> > > 192.168.1.1
> > > 192.168.1.2
> > > ...
> > >
> > > now i must write that in a html table with php.
> > > i think that is easy, but i'm a newbie and don't find anything how to do
> > > it.
> > >
> > > please help me
> > >
> > > thx
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> > > For additional commands, e-mail: php-general-help <email protected>
> > > To contact the list administrators, e-mail: php-list-admin <email protected>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>

-- 
Alberto Mucignat
Direttore Tecnico
Studenti.it - il network degli studenti
stain <email protected>

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>