what is the use of . operator at the end of variable php -
this question has answer here:
- to understand line of php [duplicate] 6 answers
- reference - symbol mean in php? 15 answers
i found following code in http://in3.php.net/manual/en/function.chr.php
<?php function randpass($len) { $pw = ''; //intialize blank for($i=0;$i<$len;$i++) { switch(rand(1,3)) { case 1: $pw.=chr(rand(48,57)); break; //0-9 case 2: $pw.=chr(rand(65,90)); break; //a-z case 3: $pw.=chr(rand(97,122)); break; //a-z } } return $pw; } ?> example: <?php $password = randpass(10); //assigns 10-character password ?>
could kindly explain me use or effect of .
after $pw
.i tried looking similar question,but not find one.if there related question,plz provide link.
thanks
.
string concatenation.
$a = 'hello'; $b = 'there';
then
echo $a . $b;
prints
hellothere
Comments
Post a Comment