newb Posted August 5, 2010 Share Posted August 5, 2010 $name = preg_replace('{(\d+)}', convertNumber("$1"), $row['name']); why isnt this working? 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']); 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! Link to comment https://forums.phpfreaks.com/topic/209866-preg-replace/#findComment-1095439 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.