$hour = 12;
$today = strtotime($hour . ':00:00');
$yesterday = strtotime('-1 day', $today);
$dayBeforeYesterday = strtotime('-1 day', $yesterday);
Related Contents:
- Converting timestamp to time ago in PHP e.g 1 day ago, 2 days ago…
- PHP How to find the time elapsed since a date time? [duplicate]
- Timezone conversion in php
- How to convert date to timestamp in PHP?
- PHP: producing relative date/time from timestamps
- Getting date format m-d-Y H:i:s.u from milliseconds
- Accessing dates in PHP beyond 2038
- best practice to generate random token for forgot password
- MySQL datetime fields and daylight savings time — how do I reference the “extra” hour?
- What is a Unix timestamp and why use it?
- How to generate random date between two dates using php?
- NOW() function in PHP
- How to convert a 13 digit Unix Timestamp to Date and time?
- How do I add 24 hours to a unix timestamp in php?
- How can I do ‘insert if not exists’ in MySQL?
- Laravel 5 – Remove Public from URL
- Run php script as daemon process
- Remove a cookie
- PHP Error : Fatal error: Constant expression contains invalid operations
- php stdClass to array
- Manipulate a string that is 30 million characters long
- CodeIgniter: Create new helper?
- What exactly are late static bindings in PHP?
- How to install a specific version of package using Composer?
- PHP – setcookie(); not working
- Round up to nearest multiple of five in PHP
- PHP: Check if an array contains all array values from another array
- Pass a JS variable to a PHP variable
- mysql_fetch_array return only one row
- How to check if a file exists from a url
- Strip off URL parameter with PHP
- Mechanisms for tracking DB schema changes [closed]
- What’s the difference between ++$i and $i++ in PHP?
- PHP check whether property exists in object or class
- How to set lifetime of session
- Disable certificate verification in PHP SoapClient
- How exactly does if($variable) work? [duplicate]
- PHP: get number of decimal digits
- When should I declare variables in a PHP class?
- What is the best way to password protect folder/page using php without a db or username
- split keywords for post php mysql
- Removing last comma in PHP?
- decode a quoted printable message in php
- getting the value of an extra pivot table column laravel
- Why does 1234 == ‘1234 test’ evaluate to true? [duplicate]
- What does @ mean in PHP? [duplicate]
- Why doesn’t var_dump work with DOMDocument objects, while print($dom->saveHTML()) does?
- Creating a mechanism to validate emails
- PHP get values from SimpleXMLElement array
- Convert tiff to jpg in php?