PHP: ereg_replace question

Discussion in 'PHP' started by vexx, Apr 28, 2008.

  1. #1
    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 28, 2008 IP
  2. vexx

    vexx Well-Known Member

    Messages:
    204
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    123
    #2
    nobody knows this?
     
    vexx, Apr 29, 2008 IP