| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|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.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved