I have the following code that should strip all non-alphanumeric characters (excluding hyphens) from some text. It somehow misses square brackets somehow, however.
ereg_replace('[^A-z0-9-]', '', strtolower(str_replace(' ','-',$title)))
Can anyone advise?
I made a mistake and wrote A-z instead of a-z. A-z encompasses the [ and ] characters.
加载中,请稍侯......
精彩评论