I have the following number 353711000 and I need to convert it to 35371TH in PHP.
How would I go about this?
I have the following number 353711000 and I need to convert it to 35371TH in PHP.
How would I go about this?
Without regular expressions:
$i = 353711000;
if ($i % 1000 == 0) {
$s = strval($i / 1000) . 'TH';
} else {
$s = strval($i);
}
print_r($s);