what is the use of . operator at the end of variable php -


this question has answer here:

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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -