note 49082 deleted from function.str-replace by nlopess

From: Date: Sun, 16 Jan 2005 10:15:05 +0000
Subject: note 49082 deleted from function.str-replace by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-83406@lists.php.net to get a copy of this message
Note Submitter: c dot k at radiogong dot com ---- I made a mistake. This code is right: <?php class parser{ //This is the class var $data; function pub(){ global $index; $file = $this->data; $dat = implode('', file($file)); foreach($index as $key => $value)$dat=str_replace('{'.$key.'}',$value,$dat); echo $dat; } } function output($dat) { // This function makes the using of this script easier $parser = new parser; $parser->datei = $dat; $parser->pub(); } ?>

« previous php.notes (#83406) next »