advanced code snippet search
mscribellito on 12/07/10
12/07/10 04:10am
function humanize($str) { $str = trim(strtolower($str)); $str = preg_replace('/[^a-z0-9\s+]/', '', $str); $str = preg_replace('/\s+/', ' ', $str); $str = explode(' ', $str); $str = array_map('ucwords', $str); return implode(' ', $str);}
Report this snippet Tweet
Comment:
You need to login to post a comment.