RE: [PHP] PHP Include Help
| From: | Jay Blanchard | Date: | Tue, 01 Oct 2002 12:50:05 +0000 |
| Subject: | RE: [PHP] PHP Include Help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118359@lists.php.net to get a copy of this message | ||
[snip]
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?
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?
[/snip]
Have a look at eregi_replace() on http://www.php.net, that should
get you
headed in the direction of a solution.
HTH!
Jay
*****************************************************
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braunfels, Texas *
* Contact jay.blanchard@niicommunications.com *
* *
* Want to present a paper or workshop? Contact now! *
*****************************************************