$temp = tmpfile(); fwrite($temp,'Line #1'.chr(13).chr(10)); fwrite($temp,'Line #2'.chr(13).chr(10)); fwrite($temp,'Line #3'.chr(13).chr(10)); fseek($temp,0); //move file pointer // char(13) = \r // char(10) = \n while($row = fgets($temp,1024)){ echo $row ." "; } fclose($temp); // remove temporary fileand no space!Output ::
Line #1
Line #2
Line #3
0 comments:
Post a Comment