bilis_money Posted April 24, 2007 Share Posted April 24, 2007 I know this is basic, but anyway i'll ask it while i'm figuring it out myself the right syntax for this. Let say i have a name 'george t. williams' now what i want to do is remove all white spaces and periods if any. and combine them all together and the out come should be like this --> 'georgetwilliams'. any kind help? thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/48452-remove-period-and-spaces-in-a-name/ Share on other sites More sharing options...
MadTechie Posted April 24, 2007 Share Posted April 24, 2007 $string = preg_replace("/[^a-zA-Z0-9]/", "", $string); Quote Link to comment https://forums.phpfreaks.com/topic/48452-remove-period-and-spaces-in-a-name/#findComment-236923 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.