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 :: object to array in 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 copy url 
Php :: php grab month from date 
Php :: php alert 
Php :: Making visible or hidden attributes from Eloquent temporarily 
Php :: php string max length 
Php :: php artisan make controller model and migration 
Php :: how tdo you convert a stringto lowercase in php 
Php :: wordpress check if page 
Php :: increase the number in php by a certain percentage 
Php :: laravel json 
Php :: Google_Service_Calendar Event Date Time 
Php :: php date from mysql and date 
Php :: how to switch from php7.4 to php7.3 mac 
Php :: if post id is wordpress php 
Php :: php get date using timezone 
Php :: how do i logout wordpress without confirmation 
Php :: get http method php 
Php :: The blade is not updated with minor changes to the first blade 
Php :: db connection postgres laravel 
Php :: laravel collection get price sum 
Php :: add 30 minutes to time in php 
Php :: deserialize php 
Php :: PHP Fatal error: Constructor test::test() cannot declare a return type in /home/iBMCb9/prog.php on line 6 
Php :: php show error 
Php :: php text Cyrillic check 
Php :: laravel required if another field has value 
Php :: laravel date rule before 18 years ago 
Php :: show html as text in php 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =