Re: Multiple substring replacement
| From: | Brent Baisley | Date: | Mon, 24 May 2004 20:32:36 +0000 |
| Subject: | Re: Multiple substring replacement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186846@lists.php.net to get a copy of this message | ||
Normally, I would say str_replace(), but for converting "\n" to "<br>", use the nl2br() function.
On May 24, 2004, at 4:28 PM, GodFoca wrote:
What's the best way of replacing every ocurrence of a substring in a LARGE string by another (longer) substring? Specifically, I have read the contents of a file into a tring with fread, and now I want to replace all "\n" with "<br>" Thanks in advance Nicolas Sanguinetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577