if($x==$y or $x==$y-1 or $x==$y+1) [download]
In reply to IF condition with a range by Anonymous Monk