Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
PHP Server Side Scripting
11:55 am May 2, 2026
This page requires javascript.
Forum Moderators:
coopster
Message Too Old, No Replies
preg replace list items
alphacooler
Msg#:3107762
3:46 am on Oct 4, 2006
(gmt 0)
I would like to wrap <li></li> tags around each newline.
How would I go about this?
GoldFish
Msg#:3107978
10:41 am on Oct 4, 2006
(gmt 0)
Do a
preg_replace
[php.net] with pattern
^(.+)$
and replacement
<li>$1</li>
.
eelixduppy
Msg#:3108000
10:54 am on Oct 4, 2006
(gmt 0)
You have to make sure you use the
m
pattern modifier
[us2.php.net] for the above to work.
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
April 2026 Google Search Observations
AdSense Earnings and Observations - April 2026
what do they want?
I need some SEO help
AdSense Earnings and Observations - May 2026
Quite quiet in here, anyone know why?
Hello again, it's been a while
I don't trust the "content network" / "Syndication" .
SEO question
Do you get tired of others copying your content?
Home
Forums Index
Server Side
/
PHP Server Side Scripting
11:55 am May 2, 2026