strip_tags with UTF-8 text

Discussion in 'PHP' started by Fracisc, Jul 10, 2010.

  1. #1
    I have this code:

    $string = strip_tags($string);

    I cannot use it on UTF-8 text.

    Error returned by validator: 'utf8' codec can't decode bytes in position 1026-1027: invalid data (maybe a high-bit character?)

    Any idea how to fix this?
     
    Fracisc, Jul 10, 2010 IP
  2. Johnta

    Johnta Peon

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try the explode function it does the same
     
    Johnta, Jul 10, 2010 IP
  3. netload

    netload Member

    Messages:
    105
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #3
    netload, Jul 10, 2010 IP