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 ::  
Php :: [InvalidArgumentException] Could not find package laravel/laravel with version 7.0 in a version installable using your PHP version, PHP extensions and Composer version. 
Php ::  
::  
Php :: php alert 
Php :: Making visible or hidden attributes from Eloquent temporarily 
Php :: php sleep half a second 
Php :: php fpm status check 
::  
Php :: group users on country vice in laravel 
Php :: constructor in php 
Php :: php compare strings case insensitive 
:: Invalid route action: [AdminAppHttpControllersAdminOrdersController]. 
Php ::  
:: groupby in laravel with count 
:: laravel route fallback 
Php :: add column in laravel migration cmnd 
Php :: laravel model relationship find soft deleted 
Php ::  
Php ::  
Php :: link input button in php 
:: calcul age php datetime 
:: php string ends with 
Php :: check if $_files is empty php 
Php :: wordpress get site url 
Php ::  
Php :: twig create new array 
::  
Php :: laravel create table with model command line 
Php :: update query wordpress 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =