AndyPSV Posted April 21, 2014 Share Posted April 21, 2014 eregi_replace('[0-9]+\.+[0-9]','',$cart['unit']); How to change it to preg_replace? I get an error: Warning: preg_replace() [function.preg-replace]: Unknown modifier '+' in --- Quote Link to comment https://forums.phpfreaks.com/topic/287911-how-to-eregi_replace-to-preg_replace/ Share on other sites More sharing options...
Solution AndyPSV Posted April 21, 2014 Author Solution Share Posted April 21, 2014 preg_replace('#[0-9]+\.+[0-9]#i','',$cart['unit']); solved Quote Link to comment https://forums.phpfreaks.com/topic/287911-how-to-eregi_replace-to-preg_replace/#findComment-1476837 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.