Re: adding a symbol in front of each line
| From: | Merlin | Date: | Wed, 17 Nov 2004 15:15:55 +0000 |
| Subject: | Re: adding a symbol in front of each line | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202308@lists.php.net to get a copy of this message | ||
Chris Boget wrote:
Hi, actually that is not as easy as it looks. Lets say we want to ad a \n after each 80 characters. There is always the problem what happens if the line has already a \n inside. E.g: This is a sample text. This is a sample text. This is a sample text Should result in:Hi there, I would like to add a > symbol infront of each line I pull out of adatabase.Similar to the function seen in online e-mail clients when you click onreply.Has anybody an idea on how to add a symbol in front of each line?`Should be simple enough using explode() followed by implode(). thnx, Chris
This is a sample text. This is a sample text. This is a sample textThat looks very complicated to me. Can anybody point me into the right direction? Thanx for any help, Merlin