如何在一个功能中同时使用这两个功能

时间:2019-04-02 10:53:55

标签: php wordpress-shortcode

我有两个短代码可以分别很好地工作(WordPress)

[str_replace(",", ".", {rating[1]})]这个逗号变成点号

[{MATH({rating[1]},"*","20")]在这里,我需要在乘以20之前将等级从逗号转换为点

我尝试了这个但没用

[MATH(str_replace(",", ".", {rating[1]}),"*","20")]

1 个答案:

答案 0 :(得分:0)

您可以here's reference

[$svalue = str_replace(",", ".", {rating[1]});]
[MATH({$value},"*","20");]