note 36805 added to function.preg-replace-callback
| From: | e-mail at dreamguard dot at | Date: | Thu, 23 Oct 2003 06:02:26 +0000 |
| Subject: | note 36805 added to function.preg-replace-callback | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-59154@lists.php.net to get a copy of this message | ||
If you want to do a date function in a template system you'll have to use the callback here.
Ex.:
function date_match ($matches)
{
return date ($matches['2']);
}
$output = preg_replace_callback ('/({DATE=")(.{1,})("})/',
'date_match', $input);
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace-callback.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+36805
Delete -- http://master.php.net/manage/user-notes.php?action=delete+36805&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+36805&report=yes
Search -- http://master.php.net/manage/user-notes.php