|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
delete entry from txt with php
I am trying to delete an entry from a tab delimited text file of a mailing list using PHP. The entries contain first name, last name, address, email, etc.
How can I find the one entry that corresponds to the email address and delete the whole entry (i.e. unsubscribe them) |
|
#2
|
|||
|
|||
|
What I would do is read each entry in and then use the explode function to seperate them into an array. From there, just use the in_array() function to check for the required email, then update the entry and use implode to write them back to the file...
|
|
#3
|
|||
|
|||
|
Thanks. I'll give it a shot. I wonder if there is a way to check that is not case-sensitive. Maybe eregi_replace()
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > delete entry from txt with php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|