Skip to main content

Posts

Indian currency format

function indianCurrencyFormat($num){ $pos = strpos((string)$num, "."); if ($pos === false) { $decimalpart="00"; } if (!($pos === false)) { $decimalpart= substr($num, $pos+1, 2); $num = substr($num,0,$pos); } if(strlen($num)>3 & strlen($num) <= 12){ $last3digits = substr($num, -3 ); $numexceptlastdigits = substr($num, 0, -3 ); $formatted = makeComma($numexceptlastdigits); $stringtoreturn = $formatted.",".$last3digits.".".$decimalpart ; }elseif(strlen($num)<=3){ $stringtoreturn = $num.".".$decimalpart ; }elseif(strlen($num)>12){ $stringtoreturn = number_format($num, 2); } if(substr($stringtoreturn,0,2)=="-,"){ $stringtoreturn = "-".substr($stringtoreturn,2 ); } return $stringtoreturn; } function makeComma($input){ // This function is written by some anonymous person - I got it from Google if(strlen($input)<=2) { return $input; } $length=substr($input,0,strlen($input)-2)

PHP stands 5th (tells TIOBE Programming community)

The TIOBE Programming Community index gives an indication of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. The popular search engines Google, MSN, Yahoo!, Wikipedia and YouTube are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written. The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted when starting to build a new software system. The definition of the TIOBE index can be found here . Position Oct 2013 Position Oct 2012 Delta in Position Programming Language Ratings Oct 2013 Delta Oct 2012 Status 1 1 C 17.246% -2.58%   A 2 2 Java 16.107% -1.09%   A 3 3 Objective-C 8.992% -0.49%