$numbers = array(1000,2000);function format_number($number) { if($number >= 1000) { return $number/1000 . "k"; } else { return $number; }}foreach($numbers as $number) { echo format_number($number); echo "<br>";}?>
Loading Info...