There are a few ways to split up text based on a delimiter.  I recommend you
look at split and explode on the PHP.net site and see what seems to be best
for your situation.  Once you go to one of them they link you to other
functions that do similar things.  I believe explode is faster but I can't
remember for sure.

-Natalie

> -----Original Message-----
> From: Kelvin [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, January 04, 2002 11:44 AM
> To:   [EMAIL PROTECTED]
> Subject:      [PHP-DB] How to insert to DB from txt??? Please help
> 
> Hi everyone,
> 
>     I have a txt file which is contained the following:
> 
>       xxxx,aaa,ccc,ddd
>       xxxx,aaa,ccc,ddd
>       .....etc.
> 
>    Now, I need to read the data from that file and than insert it into the
> table.
> 
>    ----insert into Table ("name","pass","phone","somethingelse")
> 
>    Could someone help me out here, How to write the code?
>    I know how to read from a txt file, but I don't know how to separate
> the
> data determine by ","
> 
>    Please help, I'll be very appreciate.Thanks
> 
> Kelvin.
> 
> 
> 
> 
> -- 
> 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