|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Text Files
I have two text files (A.txt and B.txt) which I can add lines text too using a php script so that the text file is as follows:
Line 1 Line A Line 2 Line B Line 3 Line C Line 4 Line D etc, etc... (The form for the page is: voyager.csd.anglia.ac.uk/~med00jpg/ds/ds.php) I've added a text input on the form, and want to be able to delete specific line numbers. (If I input 12 in the form and submit it then lines 12 on both the text files get deleted) How can I do this in php? |
|
#2
|
|||
|
|||
|
Any luck with this yet, Joe?
I'll look into it... I have a feeling the best way would be to use regular expressions... If anyone else has a suggestion or better method, please feel free to post!
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
|
#3
|
|||
|
|||
|
try something like this
PHP Code:
replace $data[11] with the line # or PHP Code:
hope this helps
__________________
-- Jason |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Text Files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|