Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php check if number starts with 0

Use substr function:

if (substr($str, 0, 1) == '0' || substr($str, 0, 2) == '00') {
    //=> matched
}
Comment

PREVIOUS NEXT
Code Example
Php :: auto submit button php 
Php :: redirect to site php 
Php :: install ext-ldap php 7.2 
Php :: how to fetch jQuery in wordpress 
Php :: php convert date string to number 
Php :: remove all spaces php 
Php :: image watermark on image laravel 8 
Php :: checking php version 
Php :: laravel string builder 
Php :: truncate table laravel eloquent 
Php :: smarty if 
Php :: laravel model increase the value by one 
Php :: what is forelse in laravel 
Php :: add id to route name in laravel blade 
Php :: php see if undefined 
Php :: Your Composer dependencies require the following PHP extensions to be installed: curl 
Php :: convert json object to array in php 
Php :: ext-bcmath php 8.0 install 
Php :: wp_query post count 
Php :: make controller laravel 8 with resource 
Php :: how to trim white space array in php 
Php :: php remove object from array by property 
Php :: wordpress acf get field 
Php :: concat and search in laravel eloquent 
Php :: Database//Eloquent//Model.php laravel errror array t- string conversion 
Php :: smtp server xampp 
Php :: php current page url 
Php :: Laravel Auth Redirect based on role 
Php :: sql repare php 
Php :: wordpress get post slug 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =