Compare more than one values with each other <p>I have about 20 different variables and i want to compare this variables with each other to check weather they are equal or not.</p> <p><strong>Example</strong></p> <pre><code>$var1 = 1; $var2 = 2; $var3 = 1; $var4 = 8; . . . $var10 = 2; </code></pre> <p>Now i want to check...</p> <pre><code>if($var1 == $var2 || $var1 == $var3 || $var1 == $var4 || ......... || $var2 == $var3 || $var2 == $var4 || ............. || $var8 = $var9 || $var8 == $var10 ||...) { echo 'At-least two variables have same value'; } </code></pre> <p>I am finding for an easy to do this. Any Suggestions?</p>