-5
I’d like to do the following I have the value 1000000 and I have to format it like this 10,000.00 Because the value comes to me already formatted and I can’t use between (mysql) to fetch a value so I do :
$preco = $row->preco;
$newpreco = preg_replace("/[^0-9]/", "",$preco);
Thus obtaining the value without letters and without punctuation this way I can filter using
SELECT * FROM produtos WHERE preco BETWEEN '2000000' AND '5000000';
Obs: 2000000 refers to 20,000.00
however when return this value needed to format it with the scores again.
Thanks I managed to do this, using the received value divided by 100 and I used number_format the way you showed it worked thanks.
– BrLelo
Good friend, good friend
– Jaffe.Marques