preg_replace_callback with local variable access


/ Published in: PHP
Save to your folder(s)

To access a local variable within a callback, use currying (delayed argument binding).\r\nThe magic lies in this curry found here: http://www.sitepoint.com/forums/showthread.php?threadid=336758

URL: http://www.php.net/manual/en/function.preg-replace-callback.php#88000

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.