0
I need to show a percentage like this 0,75
but it’s showing off like this: 0,00
follows my code:
<?php
echo number_format((float)$array['JUROS'], 2, ',', '.');
?>
The value that comes from the bank is 0,75
Thank you.
0
I need to show a percentage like this 0,75
but it’s showing off like this: 0,00
follows my code:
<?php
echo number_format((float)$array['JUROS'], 2, ',', '.');
?>
The value that comes from the bank is 0,75
Thank you.
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.
The decimal separator in PHP is the point, so it will only understand if it is
0.75
, i.e., you will first need to replace the comma by dot before formatting.– Woss
Okay, it worked. Thank you!
– SM_S