note 24089 deleted from function.str-replace by philip
| From: | philip@php.net | Date: | Fri, 11 Oct 2002 18:50:40 +0000 |
| Subject: | note 24089 deleted from function.str-replace by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-37949@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! :)