Online Loans - MPAA - Best Credit Cards - Advertising - Web Advertising

PDA

View Full Version : PHP: ereg_replace question


vexx
Apr 28th 2008, 4:01 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 :)

vexx
Apr 29th 2008, 3:27 pm
nobody knows this?