note 45365 added to function.str-replace

From: Date: Fri, 03 Sep 2004 14:48:44 +0000
Subject: note 45365 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-75985@lists.php.net to get a copy of this message
Hi! I would like to tell you some info it will surely help people when they program templates or any php using the str_replace function. Imagine you want to do this: $l1= str_replace("{MENU}",$menu,$l1); Imagine that you have in $l1 line to line of a html in where we find "{MENU}" we want to replace with the menu variable $menu content to generate templates or similar. The important thing is that when we edit something in Dreamweave and in a link we put for example a link as "index.php?menu={MENU}" the dw will code it replacing "{" by %7B and "}" by "%7D", so be carefull, because you could think that the str_replace function don't work and really the problem is that DW do it incorrectly, so you finally should just edit manually the source code with notepad, vi, joe or any editor and replace %7B by { and %7D with }. I hope this info help really. Raul Mate Galan Ceo Navenetworks ---- Manual Page -- http://www.php.net/manual/en/function.str-replace.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45365 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45365&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45365&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75985) next »