What does this PHP (function/construct?) do, and where can I find more documentation on it?
Posted
by Rob
on Stack Overflow
See other posts from Stack Overflow
or by Rob
Published on 2010-06-13T01:28:54Z
Indexed on
2010/06/13
1:32 UTC
Read the original article
Hit count: 229
php
Simple question. Here is this code.
$r = rand(0,1);
$c = ($r==0)? rand(65,90) : rand(97,122);
$inputpass .= chr($c);
I understand what it does in the end result, but I'd like a better explanation on how it works, so I can use it myself. Sorry if this is a bad question.
If you're unsure of what I'm asking about, its the (function?) used here:
$c = ($r==0)? rand(65,90) : rand(97,122);
© Stack Overflow or respective owner