Created
June 12, 2016 22:56
-
-
Save saltun/0ea2b633c5f6444a6b332cc87b088f70 to your computer and use it in GitHub Desktop.
PHP Create Random Date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Savaş Can ALTUn <[email protected]> | |
* www.savascanaltun.com.tr | |
*/ | |
$tarihBas = strtotime('1.1.2016'); // date Start | |
$tarihSon = strtotime('24.06.2016'); // date End | |
$rastgeleTarih = rand($tarihBas, $tarihSon); // create random | |
echo(date('d.m.Y H:i', $rastgeleTarih)); // convert time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment