PHP storing multiple integer variables in 1 variable? -
i'm creating php script creates random number 7 digits long , doesn't contain 0's, problem have call function rand 7 times , store every number generated in different variable, wondering how put these numbers in variable instead of adding them together
something along lines of
$security_number = $1&&$2&&$3 , on.
thanks in advance.
i think know trying achieve. need mindset want 7 character string of digits. example, if number 0028172, if stored number digital calculator displayed 28172 unless use string formatting.
if have code creating individual digits, use concatenation:
$securitycode = $digit1 . $digit2 . $digit3 . $digit4 . $digit5 . $digit6 . $digit7;
hopefully helps you.
Comments
Post a Comment