Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php script to generate random date

//Generate a timestamp using mt_rand.
$timestamp = mt_rand(1, time());

//Format that timestamp into a readable date string.
$randomDate = date("d M Y", $timestamp);

//Print it out.
echo $randomDate;
Comment

PREVIOUS NEXT
Code Example
Php :: unix timestamp in php 
Php :: How to display the fps in pygame 
Php :: write if and else in one line php 
Php :: php remove nbsp from string 
Php :: eloquent run seeder 
Php :: laravel doesNotHave in model 
Php :: Enable / Disable modules in PHP 
Php :: laravel dateinterval not found 
Php :: codeigniter dump query 
Php :: PHP Fatal error: Call to undefined function factory() in Psy Shell code on line 1, LARAVEL 8 Issue solved 
Php :: php get current year 
Php :: wordpress featured image as a background image 
Php :: laravel validation types for float 
Php :: get author display name wordpress 
Php :: php model last record 
Php :: php date + 1 year 
Php :: how to get last array element in php 
Php :: attach multiple files in laravel mailable 
Php :: laravel foreign key 
Php :: wp_get_attachment_image class 
Php :: create new laravel project with specific version 
Php :: php get location from ip address 
Php :: array con php 
Php :: php set selected option 
Php :: laravel change column type 
Php :: str_includes php 
Php :: merge two objects 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 :: laravel check method is post 
Php :: php pop off the first character of string 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =