How to get various numbering result ?

Hi friends,
How do I show an image (yellow.gif) of the script in the 100 to 200 minutes ?
now in this script when $minuts value become below 100 showing 2 images (red and yellow). But I want to show only red.

[php] if ($minuts <= 100) {
print “”;
}
if ($minuts <= 200) {
print “”;
}

	else {
	print "<img src=green.gif>";
	}

[/php]

you would first need to get the current time, then get it again and add 100 minutes and 200 points, then compare those values. something like
[php]
$curr_time = strtotime();
if($curr_time <= strtotime($curr_time, ‘+100 minutes’) {
echo “”;
} elseif($curr_time <= strtotime($curr_time, ‘+200 minutes’) {
echo “”;
} else {
echo “”;
}[/php]

Because 100 is also <= 200. You would have to specify in the second if statement $minuts > 100 && $minuts <= 200

Sponsor our Newsletter | Privacy Policy | Terms of Service