Nevermind. Leave it to me to make a very stupid mistake. I fixed it though,
and now it works great. For any who are interested, here is the working
code... Dunno why you'd need it, but whatever:

<? for ($i = 7; $i < sizeof($info); $i+=1)
{
 $new7 = str_replace("\n","<br>",$info[$i]);
 echo $new7;
}
?>

My mistake was leaving that I left the second '$' out of '$info[$i]'. At
least I found it before I frustrated myself. Thanks anyway! :-)

-- 
Kyrie Eleison,
Rick
www.spiritsword.com/phpBB2/


Rick Beckman wrote:
> <? 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.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to