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 :: run laravel mix 
Php :: minuscule string php 
Php :: strlen php 
Php :: run raw sql with doctrine manager 
Php :: how to override default name for apiresourc route in laravel 
Php :: php get environment variable 
Php :: add column migration laravel 
Php :: explode function in laravel 
Php :: php subtract seconds from datetime 
Php :: laravel get full url with parameters 
Php :: php date fomat 
Php :: How to fix undefined index: name in PackageManifest.php line 131 error with Composer 
Php :: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108872 bytes) in phar:///usr/local/bin/composer1.phar/src/Composer/DependencyResolver/RuleSet.php on line 8 
Php :: woocommerce change "Billing Details" text 
Php :: laravel migration change column length 
Php :: php get all url parameters 
Php :: wordpress get child posts 
Php :: symfony request get all parameters 
Php :: laravel get last get request 
Php :: array to string conversion in php 
Php :: setcookie in laravel 8 
Php :: php mysql if exists 
Php :: php factorial 
Php :: php capital string 
Php :: laravel instal 
Php :: convert to int php 
Php :: read-json-data-response-using-php 
Php :: get array key php 
Php :: how to use javascript variable in php 
Php :: woocommerce product object 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =