Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php check if number starts with 0

Use substr function:

if (substr($str, 0, 1) == '0' || substr($str, 0, 2) == '00') {
    //=> matched
}
 
PREVIOUS NEXT
Tagged: #php #check #number #starts
ADD COMMENT
Topic
Name
9+4 =