I'm trying to create a slug so I would like to strip out every strange character. The only thing the slug should contain is lowercase letters and underscores. Is there a way to check for strange characters and filter it out the string? everything that is not a character or underscore should be deleted
this is what I have:
if(!preg_match_all('/[a-z]/')):
$output = preg_replace("/ ... euhm ... /", "", $slug2);
else:
$output = $slug2;
endif;
I should go from this: Create a 3D Ribbon Wrap-Around Effect (Plus a Free PSD!)
to this: create_a_3d_ribbon_wrap_around_effect_plus_a_free_psd