php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "HOUR"

How can PHP be used to set and display time in both 12-hour and 24-hour formats dynamically?

To set and display time in both 12-hour and 24-hour formats dynamically in PHP, you can use the date() function along with the 'h' and 'H' format char...

What function can be used to extract the hour from a timestamp in PHP?

To extract the hour from a timestamp in PHP, you can use the `date()` function with the 'H' format specifier, which represents the hour in 24-hour for...

How can you get the access count for each full hour from a database in PHP?

To get the access count for each full hour from a database in PHP, you can use SQL queries to group the data by hour and count the number of accesses...

How can a PHP query be used to retrieve only new entries from the last hour?

To retrieve only new entries from the last hour using a PHP query, you can use the `NOW()` function in MySQL to get the current timestamp and then sub...

How can PHP be used to generate pseudo-random numbers that change only once per hour?

To generate pseudo-random numbers that change only once per hour in PHP, you can combine the current hour with a fixed seed value to ensure that the g...

Showing 1 to 5 of 158 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 31 32 ›
PHP.ORG

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

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.