Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php check string size

//get the number of characters in a string of UTF8
$utf8_char="السلام علیکم";
$size_utf8 = mb_strlen($utf8_char, 'utf8');
$size_strlen = strlen($utf8_char);
echo $size_utf8; //12
echo $size_strlen; //23!!
 
PREVIOUS NEXT
Tagged: #php #check #string #size
ADD COMMENT
Topic
Name
4+4 =