newb Posted August 5, 2010 Share Posted August 5, 2010 $name = preg_replace('{(\d+)}', convertNumber("$1"), $row['name']); why isnt this working? Quote Link to comment https://forums.phpfreaks.com/topic/209866-preg-replace/ Share on other sites More sharing options...
newbtophp Posted August 5, 2010 Share Posted August 5, 2010 You can't do that, unless you use the e modifier, $name = preg_replace('{(\d+)}e', 'convertNumber("$1")', $row['name']); Quote Link to comment https://forums.phpfreaks.com/topic/209866-preg-replace/#findComment-1095438 Share on other sites More sharing options...
newb Posted August 5, 2010 Author Share Posted August 5, 2010 works, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/209866-preg-replace/#findComment-1095439 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.