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. 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); 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
Archived
This topic is now archived and is closed to further replies.