我在数据库中有这样一个名为modal的输入,它应该是500000000.00,如何才能使我的输入适合像格式化程序这样的数据库:
$this->modal = Yii::$app->formatter->asCurrency($this->modal);
但不管用。
请提出建议,谢谢
发布于 2016-11-19 13:02:10
您应该被删除,从您的号码,然后转换成货币,您可以这样做。
Yii::$app->formatter->asCurrency(str_replace(',', '',$this->modal));https://stackoverflow.com/questions/40690586
复制相似问题