Posted by Marc on 10/13/21 11:27
Rauch Christian wrote:
> I just checked with the following code, and it displays the apropriate
> message.
>
> -----------------
> <?php
> $date=23;
> if ($date < 12) {
> $timeOfDay = "Morning";
> } elseif ($date < 18) {
> $timeOfDay = "Afternoon";
> } elseif ($date < 24) {
> $timeOfDay = "Evening";
> } else {
> $timeOfDay = "Day";
> }
So presumably it must be something to do with my server giving an
incorrect value in return to 'date ("G")'?
Marc
Navigation:
[Reply to this message]
|