Jump to content

removing links from descriptions


jakebur01

Recommended Posts

Here's my start:

$s = "This is my web address <a href='here.com'>here</a>, This is my web address <a href='here.com'>here</a>";

$pattern = array('/\<a([\w\W]*)\>([\w\W]*)\<\/a\>/isU');
$replacement = array('***');

$ss = preg_replace($pattern, $replacement, $s);

print "orig: ".$s."<br>";
print "alt: ".$ss."<br>";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.