Copy code The code is as follows:
//——————————————————————————————–
// Function name: CheckLengthBetween ($C_char, $I_len1, $I_len2=100)
// Function: Determine whether it is a string within the specified length
// Parameter: $C_char (string to be detected)
// $I_len1 (target string length) Lower limit)
// $I_len2 (the upper limit of the target string length)
// Return value: Boolean value
// Remarks: None
//—————————————————— ——————————–
function CheckLengthBetween($C_cahr, $I_len1, $I_len2=100)
{
$C_cahr = trim($C_cahr);
if (strlen($C_cahr) < $I_len1) return false;
if (strlen($C_cahr) > $I_len2) return false;
return true;
}
//—————————————————————— —————–
The above introduces the PHP function for converting integer to string to determine whether it is a string within a specified length, including the content of converting integer to string. I hope it will be helpful to friends who are interested in PHP tutorials.