PHP:Validate string length
// str len validator
function str_validator( $str, $min, $max )
{
if ( strlen( $str ) >= $min && strlen( $str ) <= $max )
{
return true;
} else
{
return false;
}
}
Tags: function, length, max, min, PHP, str, String, strlen, True, validate
This entry was posted
on Monday, June 30th, 2008 at 12:58 am and is filed under PHP.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.