| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor|
|preg replace question|
| 5:13 pm on Oct 9, 2006 (gmt 0)|
I've got a preg_replace that tosses <li></li>'s around every new line. I know it works on windows machines, but I know the code doesn't account for any other systems.
$body = preg_replace("/\n/","</li><li>",$body);
What should I change here?
| 5:31 pm on Oct 9, 2006 (gmt 0)|
The solution didn't work from your last thread [webmasterworld.com]?
Here's a full example:
$pattern = "/^(.+)$/m";
<input type="submit" />
| 5:50 pm on Oct 9, 2006 (gmt 0)|
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
© Webmaster World 1996-2013 all rights reserved