php - mb_stripos not working with accented characters -
i'm trying make mb_stripos work accented characters can't find way it.
$word = "leilao"; $text = "leilao leilões lllleeil"; $result = mb_stripos($text, $word); //works $word = "leilão"; $text = "leilão leilões lllleeil"; $result = mb_stripos($text, $word); //doesn't works i checked mb_internal_encoding() , set utf-8
can me?
what need search in long text if array of keywords exists , return true. need accented character found aswell.
there way it?
thanks in advance!
[update]
i found problem. i'm trying text database,and set utf8.
//after query assign this: $text = $rows[0]["description"]; if use mb_detect_encoding result ascii encoding. , there no function change that! tried all, iconv, mb_convert_encode, utf8_encode, result ascii. , need match accented characters/words result 0.
Comments
Post a Comment