07-20-2009, 03:19 AM
|
#2 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,298
Thanks: 17
|
This should do it
PHP Code:
// To strip special chars preg_replace("[!-@]","",$subject);
//To make all spaces - str_replace(" ","-",$subject);
//Take any sequince of two or more -s and make them one. preg_replace("[-]{2,}","-",$subject);
I wrote this off the top of my head, so I can't guarantee that its perfect.
|
|
|
|