2016-11-30 66 views
1

我目前的工作在我的wordpress网站,我需要用10乘以一个短码的答案下面是我想要的代码 - 我使用的是如何乘以短码的答案PHP

<?php 
$first_number = '[affiliates_hits for="month"]'; 
$second_number = 10; 
$sum_total = $second_number * $first_number; 
print ($sum_total); 
?> 

名为“子公司”的插件和短代码[affiliates_hits for =“month”]显示访问次数。目前,当我赞同[为=“月” affiliates_hits],它显示了8号

所以上面的代码会导致80,但它导致0

+0

作为野生想你可以尝试:$ FIRST_NUMBER = INTVAL( '[affiliates_hits为= “月”]'); – jeff

+0

不工作。它仍然打印0。 – user6176114

回答