Recursive Replace

From: Date: Wed, 02 Oct 2002 11:11:54 +0000
Subject: Recursive Replace
Groups: php.general 
Request: Send a blank email to php-general+get-118576@lists.php.net to get a copy of this message
<? for ($i = 7; $i < sizeof($info); $i+=1) { echo $info[$i]; } ?> That line of code successfully will display lines 7 and on of an included text file into my HTML boilerplate. However, in my hundreds of source text files, "<br>" is not included at the end of the lines, therefore lines 7 and on appear as one chunk of text, rather than neatly formatted lines. How can I combine that line of code with str_replace() or some other replace function in order to turn "\n" into "<br>" for each line. I've experimented with several different possibilities, but none of them output anything. Please help ASAP. The lyrics site is the most popular part of my website, and unfortunately it's down until I get this code figured out. -- Kyrie Eleison, Rick www.spiritsword.com/phpBB2/

« previous php.general (#118576) next »