<?php
// check number is greater than 0 and $length digits long
// returns 1 on success
function isNumberlength($num, $length){
if($num > 0 && strlen($num) == $length)
return 1;
else
return 0;
}
/// call the function with your values
echo isNumberlength(100,5);
?>
// check number is greater than 0 and $length digits long
// returns 1 on success
function isNumberlength($num, $length){
if($num > 0 && strlen($num) == $length)
return 1;
else
return 0;
}
/// call the function with your values
echo isNumberlength(100,5);
?>
No comments:
Post a Comment