note 17179 added to function.str-replace

From: Date: Wed, 28 Nov 2001 22:01:38 +0000
Subject: note 17179 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-21393@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? -- http://www.php.net/manual/en/function.str-replace.php http://master.php.net/manage/user-notes.php?action=edit+17179 http://master.php.net/manage/user-notes.php?action=delete+17179 http://master.php.net/manage/user-notes.php?action=reject+17179

« previous php.notes (#21393) next »