09-01-2015, 06:48 PM
|
|
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
Quote:
Originally Posted by sarettah
I don't deal with preg_replace that often but after spending a couple of minutes looking at preg_replace_callbak I am thinking that something like this will work:
$value = preg_replace_callback('/<%(.*)%>/sU', function(){ return @constant("\\1"); }, $value);
Worst that can happen is it won't ;p
edited in: also remove the e modifier I think. I forgot to do that originally.
.
|
thanks that worked 
|
|
|