I want to ask. so I take the value of the database instance I take the value price of the database, the general value eg 3000. I want to insert a character point value of 3000 into 3.000.
description:
$price = $row['price'];
// eg, the value of $price that is 3000
// Output to 3.000
how coding php to solve the problem? please help, thank you
I believe you are seeking number_format().
php > echo number_format(3000, 0, ',', '.');
3.000
php > echo number_format(3000000, 0, ',', '.');
3.000.000
It's hard to decipher your question, but is number_format()
what you're looking for?