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
// Parameters: $C_char (string to be detected)
// $I_len1 (lower limit of target string length)
// $I_len2 (upper limit of 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;
}
//———————————————————————— ———–
http://www.bkjia.com/PHPjc/321254.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321254.htmlTechArticleCopy the code as follows: //———————————————— ——————————– // Function name: CheckLengthBetween($C_char, $I_len1, $I_len2=100) /...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn