This is super simple. When I first ran its code, it was hard to believe that the code can be so short and so easy. Below is the code-

You might have seen, while registering somewhere you get a captcha to enter to prove that you are a HUMAN and not any software. And we can now generate the same captcha. In above code –
I have first stored all alphabets, digits in $str. You can also add uppercase letters there.
then look, first I have shuffled the $str and then I have split the shuffled string into array elements each of length 6. Recall that str_split() function converts a string into array of any size given by coder. So here I have given 6 that means, I will get an array in which each element eill be of size 6.
Now, I can access any element of $arr. In above code I have chosen $arr[3], you can chose either $arr[0] or $arr[1] or $arr[2].
That’s it…
Have ERROR-FREE coding !
