Advertisement
rAthus

[PHP] utf8($str) pour forcer une string en UTF-8

Nov 23rd, 2015
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.09 KB | None | 0 0
  1. function utf8($str)
  2. {
  3.     return (mb_detect_encoding($str)=='UTF-8')?$str:utf8_encode($str);
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement