function my_number_format($number){ if( !is_int($number)) return false; $after_convert_number = ''; do{ $after_convert_number = ','.substr($number,-3)."$after_convert_number"; }while($number = (int)($number/1000)); return substr($after_convert_number,1); };