0

I'm looking to be able to have different background colors for different times in the day. Would that be possible with php, or would I have to use JavaScript? The thing I'm trying o get at is having a background photo for the morning, afternoon, evening and night of each season I want to try to make the code look like this but I'm not completely sure if this approach will work.

$ty=timeOfYear("D") 
$background=__________
$t=date("H")

if ($t>"9"[$ty>"100")
________________

elseif  
__________________
4

1 に答える 1

0

I think JavaScript would be the best choice in your situation.

Get inspiration from here

https://github.com/beiyuu/beiyuu.github.com/blob/master/old-index.html

于 2013-03-26T04:39:58.243 に答える