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

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -