ereg_replace question
Posted: Mon Apr 28, 2008 5:03 pm
I have the following lines of code:
$title =ereg_replace("[^[:alnum:]]", " ", $_POST['title']);
$title = ereg_replace(" +",' ',$title);
Any inputed title will be shown, except for the special chars. My question is, how can I allow the following chars: ' and -
Tnx in advance.
p.s. i'm a newbie programmer
$title =ereg_replace("[^[:alnum:]]", " ", $_POST['title']);
$title = ereg_replace(" +",' ',$title);
Any inputed title will be shown, except for the special chars. My question is, how can I allow the following chars: ' and -
Tnx in advance.
p.s. i'm a newbie programmer