A simple question about selecting a value

How do a neewbie do this? :smiley:
I have like
$value = “number”

If “$value” is >0 and < 10
print "text 1

If “$value” is >10 and < 20
print “text 2”

and so on
Regards Terje

You may want to have a look at http://www.w3schools.com/php/php_if_else.asp.

In the mean time:

[php]$number = 10;

if($number > 0 && $number < 10) {
echo ‘Text 1’;
} else {
echo ‘Text 2’;
}[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service