joecooper Posted August 8, 2007 Share Posted August 8, 2007 how can i strip down a string to make it into text and numbers in lowercase only, a-z 0-9 only and remove all spaces so say: $fullname = "This-Is An! Example234"; it would turn it into: $fullname = "thisisanexample234"; Link to comment https://forums.phpfreaks.com/topic/63810-solved-strip-down-string/ Share on other sites More sharing options...
ToonMariner Posted August 8, 2007 Share Posted August 8, 2007 $string = "This-Is An! Example234"; $string = preg_replace('/[^0-9a-z]*/','',strtolower($string)); Link to comment https://forums.phpfreaks.com/topic/63810-solved-strip-down-string/#findComment-318004 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.