1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how to use this function with different languages ereg_replace [^A-Za-z0-9] ?

Discussion in 'PHP' started by ramysarwat, Nov 15, 2010.

  1. #1
    how to use this function with different languages ?
    SEMrush
    $new_string = ereg_replace("[^A-Za-z0-9]", "", $string);
     
    ramysarwat, Nov 15, 2010 IP
    SEMrush
  2. imocoder

    imocoder Member

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    First of all function ereg_replace() has been deprecated in the new PHP. You should use consider using preg_replace().
    Second, try using mb_internal_encoding('utf-8'); before you make a replace.

    Hope this helps.
     
    imocoder, Nov 15, 2010 IP