Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get last two numbers from int php

// first two
$year = substr($flightDates->departureDate->year, 0, 2);
// last two
$year = substr($flightDates->departureDate->year, -2);
Comment

php get last digit of number

$number = 12356;
$lastDigit = $number % 10;
echo $lastDigit; // 6
Comment

PREVIOUS NEXT
Code Example
Php :: woocommerce after order been placed hook 
Php :: php get object josn 
Php :: laravel log reader 
Php :: laravel activity log 
Php :: is replace case sensitive php 
Php :: woocommerce change add to cart button text 
Php :: wp image size name 
Php :: php mysql insert timestamp now 
Php :: laravel blade conditional class 
Php :: laravel logger 
Php :: PHP similar_text — Calculate the similarity between two strings 
Php :: laravel eloquent remove from db 
Php :: php array_walk 
Php :: laravel route match 
Php :: append data in csv file php 
Php :: php get screen size 
Php :: $product-product_type 
Php :: header php location 
Php :: php send json post 
Php :: file_get_contents php 
Php :: advantages of php 
Php :: laravel elequent query 
Php :: php assign if not null 
Php :: i+= in php 
Php :: ci constructor 
Php :: codeigniter 3 where not in 
Php :: laravel file custom name 
Php :: laravel vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php:36 
Php :: if user name is wordpress 
Php :: laravel validation numeric vs integer 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =