Posted by Rauch Christian on 10/12/44 11:27
Marc schrieb:
> 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
Could be. I am sitting here with PHP 5.0.3 currently.
simply echo out date("G") to check what it really is returning and try.
-rauch
[Back to original message]
|