Thanks, Erwin!

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


Erwin wrote:
>> On line "6", I have the list of musicians in the song.
>> Example (ignore the quotes): "Doyle Lawson -- lead vocal; Dale Perry
>> -
>> - bass vocal"
>> Is there a way to make it so that, when I include line 6 in my PHP
>> template, the ";" will be replaced with a line break so I get one
>> musician per line in the HTML output?
>
> You could use str_replace on the line you've just read...
> http://www.php.net/str_replace
>
>> Lines 7 and so on are the lyrics. The text file has one line per line
>> (makes sense, right?) and a blank line between sections of the song.
>> I have the script set up to read all the lines from 7 on, but it
>> jumbles them all together, ignoring the line breaks. Is there a way
>> to script PHP to add the line breaks, or should the line break HTML
>> just be inserted everywhere needed in all my separate files?
>
> Use nl2br: http://www.php.net/nl2br
> This function replaces all "\n" (newlines) with "<BR>\n" (HTML break
> with newline)
>
> HTH
> Erwin



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

Reply via email to