note 65470 deleted from ref.xml by bjori

From: Date: Mon, 09 Oct 2006 11:06:52 +0000
Subject: note 65470 deleted from ref.xml by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-118267@lists.php.net to get a copy of this message
Note Submitter: php dot notes at stoecklin dot net ---- I realized that there is a tiny flaw at line 4 in James' update of Felix' code. The double backslash will add backslashes to the charlist an not tabs, new lines, carriage returns, NULL-bytes, and vertical tabs respectively. The rest of the code has been reproduced as is: <?php function dataHandler($parser, $data) { //Trims everything except for spaces if($data = trim($data, "\t\n\r\0\x0B")) { $index = count($this->data) - 1; if(isset($this->data[$index]['content'])) { $this->data[$index]['content'] .= $data; } else $this->data[$index]['content'] = $data; } } ?>

« previous php.notes (#118267) next »