note 36085 added to function.str-replace

From: Date: Thu, 25 Sep 2003 13:12:32 +0000
Subject: note 36085 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-57094@lists.php.net to get a copy of this message
An example: <? $Path_to_template = "template.html"; $html = "This is some text!"; $fp = fopen("$Path_to_template",'r'); $file = fread( $fp, filesize("$Path_to_template") ); fclose( $fp ); $html = str_replace ('<%content%>)', "$html", "$file"); echo $html; ?> Enjoy! Bob http://www.car-hire-in.org/Europe/ ---- Manual Page -- http://www.php.net/manual/en/function.str-replace.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36085 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36085&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36085&report=yes

« previous php.notes (#57094) next »