here’s another approach using regex:
function utf8_strrev($str){
preg_match_all('/./us', $str, $ar);
return implode(array_reverse($ar[0]));
}
More Related Contents:
- How to open file in PHP that has unicode characters in its name?
- Reverse the letters in each word of a string
- Reverse the order of space-separated words in a string
- How i can earn variable from string in PHP? [closed]
- Remove empty array elements
- How to Truncate a string in PHP to the word closest to a certain number of characters?
- How to evaluate formula passed as string in PHP?
- Remove excess whitespace from within a string
- preg_match and UTF-8 in PHP
- Truncate a multibyte String to n chars
- Remove portion of a string after a certain character
- How can I replace a variable in a string with the value in PHP?
- How do I linkify urls in a string with php?
- How to split a string by multiple delimiters in PHP?
- Is there any way to detect strings like putjbtghguhjjjanika?
- PHP decoding and encoding json with unicode characters
- Check whether $_POST-value is empty
- PHP – split String in Key/Value pairs
- UTF-8 to Unicode Code Points
- How to get email address from a long string
- use strings to access (potentially large) multidimensional arrays
- What factors make PHP Unicode-incompatible?
- String contains any items in an array (case insensitive)
- Structure of a Serialized PHP string
- How to cast array elements to strings in PHP?
- PHP quotes inside quotes
- Remove accents without using iconv
- Remove all non-numeric characters from a string; [^0-9] doesn’t match as expected
- Multi-byte safe wordwrap() function for UTF-8
- Search and replace multiple values with multiple/different values in PHP?