str_replace
Hey Jason
Am using the following to rename plain English into a permalink:
$WA_fieldValuesStr = "".((isset($_POST["BlogTitle"]))?$_POST["BlogTitle"]:"") ."" . $WA_AB_Split . "".((isset($_POST["BlogContent"]))?$_POST["BlogContent"]:"") ."" . $WA_AB_Split . "".($WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]) ."" . $WA_AB_Split . "".((isset($_POST["BlogDate"]) && $_POST["BlogDate"]!="" )?date("Y-m-d h:i:s", strtotime(str_replace("/","-",$_POST["BlogDate"]))):"") ."" . $WA_AB_Split . "".((isset($_POST["BlogTitle"]))?preg_replace('/[^0-9a-z(),]/i','-',str_replace(array("%","!","?","@","\-","/",".","\"","_","\'","*","#"),"",$_POST["BlogTitle"])):"") ."" . $WA_AB_Split . "".((isset($_POST["Live"]))?$_POST["Live"]:"") ."";
What am I doing wrong that would make the following Don't let bootstrapping lead to handcuffing make the URL www.domainname.com/blog/don---t-let-bootstrapping-lead-to-handcuffing (ie too many '-' in the word Dont)
Thanks
Jamie