Get time formatted day-month-year in php – PHP snippet
If you wish to format a date into a different format in PHP is very simple. All you need to do is look bellow....
Get current time formatted day/month/year in php – PHP snippet
If you wish to format the current date in format day/month/year just copy the function bellow and use it where you want.
function nogettime(){
...
Countdown To A Date in PHP
If you wish a script in PHP that will countdown the time you can use the following code:
$dtt_end = new DateTime('January 3, 2030 2:00...
Twitter Style “Time Ago” Dates on PHP
The following function will show the time like Twitter with that info ago, like 9 hours ago:
function _agotime($tm,$rcs = 0) {
$cur_tm...
Get the Week Number From A Date in PHP
When you code maybe you find difficult to get the week number from a date. Maybe you think of some particular dates and how...
Check If A Date Is In The Past Or In The Future in PHP
The following code will help you to check if a date in the future or in the past. Where are this required? A lot...
Get Difference Between Two Times
The following function will help you get the difference from two dates in PHP. You need to specify the 2 dates when you call...
Convert minutes to hours and minutes or seconds to minutes and seconds
If you wish to convert minutes to hours and minutes display or convert minutes to minutes and second display here is a super useful...
Export an array to CSV in PHP
I was working on creating a small code that would help me export any array into a CSV file.
How to Add WooCommerce Custom Text Field for all Variations
I need it to add a custom text field for every variations in WooCommerce products. I figure out a code that helped...