Re: Problem with str_replace
| From: | Thomas Goyne | Date: | Sun, 29 Aug 2004 23:54:38 +0000 |
| Subject: | Re: Problem with str_replace | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195132@lists.php.net to get a copy of this message | ||
On Sun, 29 Aug 2004 17:45:05 -0600, Francisco Javier Escoppinichi Fernández <fjefdez@gmail.com> wrote:
On Sun, 29 Aug 2004 19:36:49 -0400, John Nichel <jnichel@by-tor.com> wrote:http://us4.php.net/manual/en/function.str-replace.php I suggest you look at what the func actually does, as its not what you think. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/Francisco Javier Escoppinichi Fernández wrote:Hello people... I have a little problem here... I hope you can help me... I'm building a simple template system for a web site, and I created some "tags" in a .html file that I read using the file_get_contents() function. The "tags" I created are something like {menu}, {date}, {user}, etc. Well, the problem shows up when I use the function str_replace("{menu}", $var_with_some_menu_links, $html_contents). Nothings happen and when I output the template contents, I see the tags, in other words, nothing gets replaced. Any ideas on what I'm doing wrong? Thank you very much in advance for your help.Show the code which isn't working.Here it goes: [snip]