urls and target=_blank

From: Date: Sat, 12 Apr 2003 23:35:50 +0000
Subject: urls and target=_blank
Groups: php.general 
Request: Send a blank email to php-general+get-143606@lists.php.net to get a copy of this message
Hello, I'd like to make only external links open in a new window, but not open in new window when its an on site link, any easy method of doing this? this is the custom code use for urls, just wondering if its possible to do this. $news = preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/si", "<a href=\\1 target=_blank>\\2</a>", $news); cheers, - Sebastian

« previous php.general (#143606) next »