Re: [PHP] Parsing a File

2004-09-21 Thread Marek Kilimajer
Harlequin wrote: Hi all. I've been through the PHP manual and wonder which file option will best suit my needs. I basically want to take a file that the user uploads and parse it into a variable or string so I can insert it into a field in my database. Do I use: File() creates an array file_get

[PHP] Parsing a File

2004-09-21 Thread Harlequin
Hi all. I've been through the PHP manual and wonder which file option will best suit my needs. I basically want to take a file that the user uploads and parse it into a variable or string so I can insert it into a field in my database. Do I use: File() file_get_contents Or something else...?

Re: [PHP] Parsing a file line by line

2003-11-25 Thread Justin French
On Wednesday, November 26, 2003, at 12:44 PM, Jason Williard wrote: I would like some assistance in creating a script that will parse a file line by line. The file that I need to parse has a designator at the beginning of most lines. I need the script to search for a specific designators (list

Re: [PHP] Parsing a file line by line

2003-11-25 Thread - Edwin -
On Tue, 25 Nov 2003 17:44:09 -0800 "Jason Williard" <[EMAIL PROTECTED]> wrote: ...[snipped]... > Does anyone have any ideas for me? Okay, this is just an idea. Use file() to put everything in an array. http://www.php.net/manual/en/function.file.php Then find a function here that would let y

[PHP] Parsing a file line by line

2003-11-25 Thread Jason Williard
I would like some assistance in creating a script that will parse a file line by line. The file that I need to parse has a designator at the beginning of most lines. I need the script to search for a specific designators (listed in an array) and then send an e-mail with the contents of each line.

Re: [PHP] Parsing a file (fopen) and replacing text...

2003-07-12 Thread Justin Farnsworth
Quiller wrote: You can certainly do this with regular expressions, rewriting your source file. Why don't you just use Smarty templates and be over with it? _justin > > This is for a very inefficient skin script I'm writing; the CMS I am using > is based in PHP but generates static files, so in

[PHP] Parsing a file (fopen) and replacing text...

2003-07-12 Thread Quiller
This is for a very inefficient skin script I'm writing; the CMS I am using is based in PHP but generates static files, so in order to change skins I am opening the page in question and loading it into $url. From there I do an ereg and take out what I need. The script itself can be found: http://eq