function namePrefix ($number
{
//Similar scrip in jquery https://jsfiddle.net/ayn_/z2677vs5/
$currentNum = $number
$currentNum = preg_replace'{/s|,|$|h}', '', $currentNum);
if ($currentNum > 999 && $currentNum < 999999) {
$newNum = ($currentNum / 1000);
$newNum = floor$newNum*100)/100 . 'k'
} else if ($currentNum > 999999) {
$newNum = ($currentNum / 1000000);
$newNum = floor$newNum*100)/100 . 'M'
} else {
$newNum = 'Error, number format is invalid'
}
return $newNum
}