You are here: Re: Simple PHP that isn't working « All PHP « IT news, forums, messages
Re: Simple PHP that isn't working

Posted by Rauch Christian on 10/13/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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация