abhilashdas Posted February 22, 2007 Share Posted February 22, 2007 Hi, I need to compare the line obtained from the file() function with another line. Bcoz of newline(could be) , I m getting no match. How can I get rid of newline from the end? :-\ Link to comment https://forums.phpfreaks.com/topic/39627-file-function/ Share on other sites More sharing options...
kenrbnsn Posted February 22, 2007 Share Posted February 22, 2007 Use the trim() function. Ken Link to comment https://forums.phpfreaks.com/topic/39627-file-function/#findComment-191257 Share on other sites More sharing options...
Orio Posted February 22, 2007 Share Posted February 22, 2007 Use rtrim() Edit- Ken is faster Orio. Link to comment https://forums.phpfreaks.com/topic/39627-file-function/#findComment-191258 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.