mardi 26 avril 2016

HTML Not showing decimals from mysql db in Laravel Blade

In my mysql db I manage table's column to keep product prices.like $200.00 or $200.50 (only two points). When it comes to html I catch it like this from blade view.

<p class="excerpt col-md-6 col-md-offset-5 alert alert-danger">Price per Instance : AUD $</p>

Problem is, $200.00 it is not showing .00 and when $200.50 it is 200.5 and $200.51 or any two point it gives $200.50999450684 something like this. What should I do

And also please let me know how to save number with two decimal point in html to mysql db

Thanks....



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire