Alternative to money_format() Function in PHP on Windows Platform

前端 未结 13 1830
天命终不由人
天命终不由人 2020-12-01 09:02

I am using the money_format() function in PHP, which gives the following error:

Fatal error: Call to undefined function money_format()


        
相关标签:
13条回答
  • 2020-12-01 09:53

    Instead of money_format() you can also try this. Hope this will be helped any guy who faced this call to undefined function money_format() error.

    <?php
        $price = number_format($price, 2); 
        echo "$".$price;
    ?>
    

    Output:

    $120.00
    
    0 讨论(0)
提交回复
热议问题