There is no direct function for this in my knowledge. But it can be done easily like so.
“`php
if ( mb_strlen( $string, ‘ASCII’ ) === mb_strlen( $string, ‘utf-8’ ) ) {
return true;
}
“`
There is no direct function for this in my knowledge. But it can be done easily like so.
“`php
if ( mb_strlen( $string, ‘ASCII’ ) === mb_strlen( $string, ‘utf-8’ ) ) {
return true;
}
“`
Leave a Reply