Created
March 6, 2014 10:06
-
-
Save nasal/9386594 to your computer and use it in GitHub Desktop.
PHP: mb_ucwords
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!function_exists('mb_ucwords')) | |
{ | |
function mb_ucwords($str) | |
{ | |
return mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); | |
} | |
} | |
?> |
You can use this library to have the correct behavior: https://github.com/MathiasReker/php-mbstring-extension
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That doesn't produce the correct results.
Test this on "USA" or "DVD" before you decide if this still fits your needs.