Reputation: 18306
How can I get the timestamp of a desired hour? The hour is in a variable that the user set.
Upvotes: 0
Views: 1572
Reputation: 254906
$hr = 10; echo strtotime("today +$hr hours");
Upvotes: 3
Reputation: 7780
You can use mktime() function to build timestamp of any datetime.
Upvotes: 4