Hello,
I have found a script that shows images depending on the time (original shows a hotelview with day/night depending on the time).
I have tried editing it, but i can't seem to figure out the => and <= things. So if anyone can explain that to me, id be happy
And if someone could make the script show different images at each of the hours, id be even more happy
I have found a script that shows images depending on the time (original shows a hotelview with day/night depending on the time).
I have tried editing it, but i can't seem to figure out the => and <= things. So if anyone can explain that to me, id be happy
And if someone could make the script show different images at each of the hours, id be even more happy
Code:
<?php
$now_ho = date("H");
//Daytime(6h~19h)
if ($now_ho <= 6){
if ($now_ho >= 18){
$vwimg = "imagelink";
}
}
//Night (19h~6h)
if ($now_ho <= 6){
if ($now_ho >= ){
$vwimg = "imagelink";
}
}
if ($now_ho < 6){
if ($now_ho >= 7){
$vwimg = "imagelink";
}
}
?>
<img src="<?php echo $vwimg ?>" alt="some_text"/>