Re: Text file Parsing

From: Date: Mon, 12 Jun 2000 16:33:07 +0000
Subject: Re: Text file Parsing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1629@lists.php.net to get a copy of this message
if your file is in the format field1<BR>field2<BR>field3<BR> field1<BR>field2<BR>field3<BR> etc. then $filename = "yourfile"; $a_file = file ($filename); while (list($k, $line) = each ($a_file)) { $b = explode ("<BR>", $line); echo "b[0]=$b[0], b[1]=$b[1], b[2]=$b[2]<BR>"; } . hth Ryan On Mon, Jun 12, 2000 at 03:57:21PM +0000, dhaval desai wrote: > Hi! > > I need something which is Damn urgent.. > > Let me explain what I exactly need. > > I need to parse a text file in which there are three fields...i.e > each field is seperated by a <br>{ this is the delimeter} > > Now Php parser can recognise a tab delimited file... > > I need a script which can help me parse this text file. > > > Thanx a lot > > Dhaval Desai > > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at > http://www.hotmail.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net ---end quoted text---

« previous php.general (#1629) next »