DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
9+4 =
Submit