Home >Backend Development >PHP Tutorial >A function that determines whether it is a string within a specified length

A function that determines whether it is a string within a specified length

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-25 09:07:141042browse
  1. //

  2. // Function name: CheckLengthBetween($C_char, $I_len1, $I_len2=100)
  3. // Function: Determine whether it is a string within the specified length
  4. // Parameters: $C_char (string to be detected)
  5. // $I_len1 (lower limit of target string length)
  6. // $I_len2 (upper limit of target string length)
  7. // Return value: Boolean value
  8. // Remarks: None I_len1) return false;
  9. if (strlen($C_cahr) > $I_len2) return false;
  10. return true;
  11. }
  12. ?>

  13. Copy code
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