php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "Date Interval objects"

How can one efficiently work with date intervals in PHP using DateTime objects?

Working with date intervals in PHP can be efficiently done using DateTime objects. By creating two DateTime objects representing the start and end dat...

How can PHP developers efficiently round date and time values to the nearest interval, such as 5 minutes, in a database query?

When rounding date and time values to the nearest interval, such as 5 minutes, in a database query, PHP developers can use the MySQL function `TIMESTA...

How can PHP developers efficiently generate a range of dates using DateInterval and DatePeriod objects in PHP for date selection in forms?

When PHP developers need to generate a range of dates for date selection in forms, they can efficiently use DateInterval and DatePeriod objects. By cr...

How can DateTime objects be effectively used in PHP to iterate over months and years?

To iterate over months and years using DateTime objects in PHP, you can create a start date and an end date, then use a loop to increment the date by...

How can timestamps be used to add a specific time interval, like 6 weeks, in PHP?

To add a specific time interval, like 6 weeks, to a timestamp in PHP, you can use the strtotime() function to convert the timestamp to a Unix timestam...

Showing 6 to 10 of 10000 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 1999 2000 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.