[PHP] help - parsing text file

2001-04-04 Thread Kurth Bemis
arg - i' at wits end. i need to parse a text file into a mysql insert statement. the statement isn't the problem its parsing the text file. heres a sample of the file West Chesterfield (603) 256-8278 V.90 (603) 307-2100 V.90 & K56flex (603) 307-2200 ISDN / DOV Hinsdale336 West Chesterfield25

[PHP] help - parsing text file

2001-04-04 Thread Kurth Bemis
arg - i' at wits end. i need to parse a text file into a mysql insert statement. the statement isn't the problem its parsing the text file. heres a sample of the file West Chesterfield (603) 256-8278 V.90 (603) 307-2100 V.90 & K56flex (603) 307-2200 ISDN / DOV Hinsdale336 West Chesterfield25

[PHP] Help parsing text file?

2004-01-08 Thread Carlton L. Whitmore
I'm very new to PHP. I want to display /var/log/lastlog with php on a webpage, but I need some help. How do I do that? Looking at the docs it looks like file() would work, but I couldn't get it to display the file. Carlton.

Re: [PHP] help - parsing text file

2001-04-04 Thread Plutarck
If it's always in that format you could do an explode on "\n", then run the regex on only the elements of the array you need to rip something from. So you can build a much simpler and smaller regex to do your work. -- Plutarck Should be working on something... ...but forgot what it was. "Kurth

Re: [PHP] Help parsing text file?

2004-01-08 Thread Brad Pauly
On Thu, 2004-01-08 at 16:27, Carlton L. Whitmore wrote: > I'm very new to PHP. > I want to display /var/log/lastlog with php on a webpage, but I need > some help. How do I do that? > Looking at the docs it looks like file() would work, but I couldn't get > it to display the file. I would guess tha