A simple subtraction practice <p>I want to make a little game for my son to practice subtraction ( since he won't get off the computer !! ) . i have tried this code but my problem is that i want the first number to be always higher than the second number (cause that's wht they know so far ) ..this is my code :</p> <pre><code>&lt;?PHP $string = "1234567890"; $shuffled = str_shuffle($string); $shuffled2 = str_shuffle($string); $num1 = substr($shuffled, 0, 3); $num2=substr($shuffled2, 0, 3); if ($num2 &gt; $num1) { some code here .. } else { echo "$num1&lt;BR&gt;"; echo "$num2&lt;BR&gt;"; $res= $num1-$num2; echo "$res&lt;BR&gt;"; } ?&gt; </code></pre> <p>so what is the missing code here ..i was thinking (goto) back from my days of basic to run code from the beginning until condition if satisfied ..but i don't know if that works in PHP .. Or ...is there a way to put a condition on shuffle in the first place so it can always return the first number higher than the second number? </p>