php - How to remove last two characters every line of text file -
How to remove the last two letters of each line of the text file? for example. A.T.T. In the new txt file:
100815 100815 100822 100822 200811
Thank you :)
$ Content = file ("long.txt"); $ Fp = fopen ('short.txt', 'w'); Forex currency ($ $ $ content in line) {$ small = substrate (trim ($ line), 0, -2); FILIT ($ FP, $ small. "\ N"); } Fclose ($ fp);
Comments
Post a Comment