Jump to content

[SOLVED] Operators


mcdof001

Recommended Posts

sorry. its so hard to explain. if variable 1 is i inbetween the range or two more or two less do an action. i have done it the long way round. here is what i ment...

if ($a == $a1) {
//the same action
} elseif ($a == $a1 + 1) {
//the same action
} elseif ($a == $a1 + 2) {
//the same action
} elseif ($a == $a1 - 1) {
//the same action
} elseif ($a == $a1 - 2) {
//the same action
}

Link to comment
https://forums.phpfreaks.com/topic/71148-solved-operators/#findComment-357822
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.