Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $captcha=rand(1,15);
- $num1=rand(1,10);
- $num2=$captcha - $num1;
- $operator=$num2>0?"+":"-";
- $num2=abs($num2);
- echo "{$num1}{$operator}{$num2} = {$captcha}";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement