Search
 
SCRIPT & CODE EXAMPLE
 

PHP

unix timestamp in php

strtotime("now");

// strtotime is a function that will take a string parameter 
// that specifies a date, and returns a unix time stamp bassed
// on that

echo strtotime("2020-02-24");

// prints: 1582502400
Comment

Getting Current Timestamp in PHP

<?php
$current_timestamp = time();
echo $current_timestamp;
?>
Comment

php timestamp

<?php

echo time();

?>
Comment

php timestamp


<?php
$nextWeek = time() + (7 * 24 * 60 * 60);
                   // 7 days; 24 hours; 60 mins; 60 secs
echo 'Now:       '. date('Y-m-d') ."
";
echo 'Next Week: '. date('Y-m-d', $nextWeek) ."
";
// or using strtotime():
echo 'Next Week: '. date('Y-m-d', strtotime('+1 week')) ."
";
?>

Comment

timestamp php


<?php
$date = date_create();
echo date_timestamp_get($date);
?>

Comment

PREVIOUS NEXT
Code Example
Php :: In Connection.php line 664:SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema 
Php :: year shortcode wordpress 
Php :: how to set timezone for iran in laravel 
Php :: full url php 
Php :: Disable wordpress wp cron 
Php :: Add [nom] to fillable property to allow mass assignment 
Php :: how to create controler in laravel 
Php :: how get the first item in foreach in laravel 
Php :: session has laravel blade 
Php :: get php memory limit command line 
Php :: import class route laravel 
Php :: find type in php 
Php :: php request uri 
Php :: passed to LcobucciJWTSignerHmac::doVerify() must be an instance of LcobucciJWTSignerKey, null given, 
Php :: codeigniter get num_rows 
Php :: test a single file laravel 
Php :: symfony clear cache 
Php :: get the current page id in wordpress 
Php :: wordpress post date 
Php :: php count number of files in directory 
Php :: php decode html special characters 
Php :: carbon parse sunday 30 days ago 
Php :: php is variable a number 
Php :: php text colors 
Php :: laravel if request has 
Php :: php array_map with anonymous function 
Php :: php create 404 error 
Php :: carbon set locale laravel 
Php :: Laravel 7 create-project 
Php :: include php 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =