johnwayne77 Posted February 28, 2009 Share Posted February 28, 2009 i have some data in a .txt file. e.g.: codes1 codes2 codes3 etc. sometimes i may have blank rows inside: codes1 codes2 codes3 codes4 etc. i serve these codes using fwrite command. can i specify to eliminate blank rows? Link to comment https://forums.phpfreaks.com/topic/147326-fwrite-blank-rows/ Share on other sites More sharing options...
corbin Posted February 28, 2009 Share Posted February 28, 2009 $tmp = trim($string); //to cut any new lines off the end/start of string if(!empty($tmp)) { //write it } Link to comment https://forums.phpfreaks.com/topic/147326-fwrite-blank-rows/#findComment-773331 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.