Home > Article > Backend Development > How to remove thousandth place in php
php method to remove thousandths: first open the corresponding PHP code; then modify the content to [$product['price1']=$product['price1'];]; finally execute the PHP file That’s it.
## Recommended: "PHP Video Tutorial"
Specific question:
php function, the price of a product is 1500, and now the website displays 1,500.00. How to remove the thousands separator and display 1500.00 or 1500The function is as follows ,$product['price1']=number_format($product['price1'],2);
Solution:
$product['price1']=number_format($product['price1'],2);This line is modified to
$product['price1']=$product['price1'];
The above is the detailed content of How to remove thousandth place in php. For more information, please follow other related articles on the PHP Chinese website!