note 24089 added to function.str-replace
| From: | cristi at n3x dot ro | Date: | Tue, 06 Aug 2002 14:49:58 +0000 |
| Subject: | note 24089 added to function.str-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-34396@lists.php.net to get a copy of this message | ||
Hello!
Here you go with the str_replace method!
You can put a var. into a string the like this:
(mine worked with language system on my Company's website)
function do_it($output, $lang)
{
$output = str_replace('N3X', '<a href =
index.php?id_page=about_N3X&lang='."$lang".'>N3X</a>',
$output);
}
That's all!
Neat and simple!
-------------------
This function is usable for anyone who use variables into str_replacement links in a CMS System.
A "Thank you" mail is appreciated! :)
--
http://www.php.net/manual/en/function.str-replace.php
http://master.php.net/manage/user-notes.php?action=edit+24089
http://master.php.net/manage/user-notes.php?action=delete+24089
http://master.php.net/manage/user-notes.php?action=reject+24089