Turn 2600 into 26.00 in PHP? [closed]

-6

I will have values like 2600 or 15000 and need to be set as 26.00, 150.00, etc. How can I do this in PHP? With the number_format function it puts it wrong (in my case) as 2600.00 or 15.000.00. How can I do it?

    
asked by anonymous 04.01.2016 / 21:10

1 answer

1

Do the following:

<?php
$number = "15000";
echo number_format($number, 0, ',', '.');
?>

So it will return: 15,000

    
04.01.2016 / 21:16