How do a neewbie do this?
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
How do a neewbie do this?
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]