Arik,

What exactly are you attempting to do?  From your questions, it appears that
you've stored data in fields in a line and would like to extract those data.
Iin PHP, your code may look like:

$fields = explode("/",$inputline);

this assumes that $inputline contains something like:
"lastname/firstname/street1/street2/city/state/zip/telephone"
such as:  "smith/john/123 main street/apt
c/anytown/texas/12345-6789/972-123-4567"

this would result in:
$fields[0]="smith"
$fields[1]="john"
$fields[2]="123 main street"
$fields[3]="apt c"
$fields[4]="anytown"
$fields[5]="texas"
$fields[6]="12345-6789"
$fields[7]="972-123-4567"

the line $inputline would have been read from a text file.

-----Original Message-----
From: Jerry [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 3:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Urgent! Store Data In A Text File!


To retrieve data from a text file, I'm using:

$fp= file("textfile.txt","r"); foreach($fp as $line) echo "- $line -";

Jerry

"Arik Ashepa" <[EMAIL PROTECTED]> wrote:
> Can someone please tell me how can I add and retrive data from a text file
I
> know it has something to do with Spliting...???
> But I dont know the code...


> Arik











-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to