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 :: php even odd program 
Php :: PHP sqrt() Function 
Php :: carbon subdays 
Php :: Convert String containing commas to array 
Php :: export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH 
Php :: get csv file from server folder in PHP 
Php :: php laravel config 
Php :: create symbolic in lumen laravel 
Php :: php get all in object as array 
Php :: blade select selected 
Php :: php foreach string in array 
Php :: php interface vs abstract class 
Php :: laravel raw query join many to many 
Php :: laravel distinct not working 
Php :: php post request 
Php :: php -S localhost:8000 
Php :: Create Model with Controller in Laravel 
Php :: php nginx file not found 
Php :: php cookie 
Php :: laravel without global scope 
Php :: passing parameters with route keyword in blade laravel 
Php :: laravel without global scopes 
Php :: how to get shop page url in wordpress 
Php :: readfile in php 
Php :: php is int 
Php :: eloquent where parentheses 
Php :: laravel migration alter column unique 
Php :: how to log object laravel logger 
Php :: how to show image from php 
Php :: how to add custom field in comment form in wordpress 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =