note 17179 rejected from function.str-replace by zak

From: Date: Thu, 29 Nov 2001 04:50:03 +0000
Subject: note 17179 rejected from function.str-replace by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21411@lists.php.net to get a copy of this message
Is it possible to use this function to ADD a string into a selective string within a text? one variable (html text) with somewhere: <a href="www.123.com">123.com</a> Now I want to add a "target="_blank"" to this <a>... I thought it would be something like: $string = str_replace("<a%>", "<a target=\"_blank\">", $string); But that's probably wrong :) Any sollutions?

« previous php.notes (#21411) next »