note 18620 deleted from function.preg-replace-callback by sniper

From: Date: Tue, 30 Sep 2003 12:27:41 +0000
Subject: note 18620 deleted from function.preg-replace-callback by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-57460@lists.php.net to get a copy of this message
Note Submitter: "Prof. Nimnul" <trionon@mail.ru> ---- Here is a little example implementing <!--#include virtual="" --> parsing. Maybe this is not the most optimal way, but it works. function _my_callback($matches) { return my_ReadFromFile($matches[1]); } $str = preg_replace_callback('/<!--#include virtual="(.+?)" -->/', '_my_callback', $str);

« previous php.notes (#57460) next »