Moron Posted July 19, 2007 Share Posted July 19, 2007 I was trying the wordwrap() function and it works as advertised, but it doesn't present the text file like Notepad does. I want to display a file exactly like I see it in Notepad with Word Wrap on. Ideas? Link to comment https://forums.phpfreaks.com/topic/60803-is-there-a-php-version-of-the-html-tag/ Share on other sites More sharing options...
chigley Posted July 19, 2007 Share Posted July 19, 2007 <?php echo "<pre>".wordwrap(file_get_contents("file.txt"))."</pre>"; ?> Like that? Link to comment https://forums.phpfreaks.com/topic/60803-is-there-a-php-version-of-the-html-tag/#findComment-302506 Share on other sites More sharing options...
Moron Posted July 19, 2007 Author Share Posted July 19, 2007 <?php echo "<pre>".wordwrap(file_get_contents("file.txt"))."</pre>"; ?> Like that? Yep! Thanks! Link to comment https://forums.phpfreaks.com/topic/60803-is-there-a-php-version-of-the-html-tag/#findComment-302541 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.