Submitted Questions

  • Reverse a sting using loop in php

    Hi , when I reverse a string using loop in php like {geshibot language="php"}$str="navin"; $rstr=""; $len=strlen($str); for($i=$len-1;$i>=0;$i--) { $rstr.=$str[$i]; } echo $rstr;{/geshibot} It work but I want to know why we use .dot(.) $rstr.=$str[$i]; over here thanks in advance

    Emiliano Gaytan

    • Mar 21st, 2013

    to concat, . operator concats left & right values; Google it for more info "php $myVar = 2; // declare variable in php print_r($myVar . ""); //print on screen your variable w htm...