结合如何有一定的PHP作为加法对PHP计算如何两个PHP计算
这是基本代码
<?php echo (str_replace('.',',',round((str_replace(',','.',(str_replace('€','',$discount['discountedPrice'])))*1.2),2)))." Eur"; ?>
,并想添加以下内容:
(str_replace('.',',',round((str_replace(',','.',(str_replace('€','',$discount['discountAmount'])))*0.2),2)))
所以我想补充(+),看起来像这样,但不知道如何把它:
(str_replace('.',',',round((str_replace(',','.',(str_replace('€','',$discount['discountedPrice'])))*1.2),2))) + (str_replace('.',',',round((str_replace(',','.',(str_replace('€','',$discount['discountAmount'])))*0.2),2)))
您可以使用PHP构建功能money_format。看看文档 - > http://php.net/manual/en/function.money-format.php –
一会儿我以为这是一个lisp问题 – Federkun
我只是想将以下内容加在一起,然后它会工作...像第一代码+第二代码 –