₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,347,669 members, 8,528,743 topics. Date: Wednesday, 02 December 2026 at 07:41 PM

Toggle theme

Help With Preg_replace And Ereg_replace - Webmasters - Nairaland

Nairaland Forum › Science/Technology › Webmasters › Help With Preg_replace And Ereg_replace (539 Views)

1 Reply

Help With Preg_replace And Ereg_replace by adex3g(op): 11:04am On Aug 25, 2014
$AOG_te = ereg_replace("http://[A-Za-z0-9./=?-_]+","<a href=\"\\0\">\\0</a>", $AOG_te);
$AOG_te = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href=\"$1\">$2</a>",$AOG_te);
i have that above code in my bbcode function.
But ereg_replace did not allow the preg_replace to work, what can i do so that two will work without affecting each other.
If user post http:// nairaland.com or [ url=http:// nairaland.com]nairaland[/url] should turn to link.
1 Reply

• 2 • 3 • 4

Paypa • Help Pls. Can't Set My Blog • A New Way To Maximize Profit On Your Website