script:
<?php
$str1='66615888';
$str2='12333333345';
echo 'The number of unique characters in "'.$str1.'" is: '.strlen(count_chars($str1,3)).' ('.count_chars($str1,3).')'.'<br><br>';
echo 'The number of unique characters in "'.$str2.'" is: '.strlen(count_chars($str2,3)).' ('.count_chars($str2,3).')'.'<br><br>';
?>
:
"66615888" : 4 (1568)
"12333333345" : 5 (12345)
PHP count_chars() 3 , .
The PHP string function strlen()creates the total number of unique characters.
user8194842
source
share