Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

mb_strcmp

By: a guest on Jul 5th, 2011  |  syntax: PHP  |  size: 0.26 KB  |  views: 2,234  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. /**
  4.  * Comparaison de chaines unicode
  5.  */
  6. if (!function_exists('mb_strcmp')) {
  7.  
  8.   function mb_strcmp($s1, $s2) {
  9.  
  10.     return strcmp(
  11.       iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $s1),
  12.       iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $s2));
  13.   }
  14. }