乘法数学不起作用? [英] multiplication math not working ?
问题描述
hi group -
我在一个函数中有这个 - 所以我刚把它从函数中移出
以获得可读性。
有人可以告诉我为什么这不会返回结果:
n1次n2
正如我所说 - 为了便于阅读,我把它从功能中取出:
在我的php文件中:
$ number_percent =" 25";
echo" history [''order_total'']是。$ history [''order_total'']。"< br />" ;;
echo" number_percent是。$ number_percent。< br />" ;;
$ total =(($ history [''order_total''])* $ number_percent);
echo" total is" .total。"< br />" ;;
这是浏览器中的输出:
历史[''order_total'']是$ 241.47
number_percent是25
总计是0
为什么?任何建议或指示将不胜感激!
hi group -
I had this in a function - so I''ve just moved this out of the function
for readabilty.
Can someone please tell me WHY does this not return the result of :
n1 times n2
As I said - I took it out of the function just for readability :
In my php file :
$number_percent="25";
echo "history[''order_total''] is ".$history[''order_total'']."<br />";
echo "number_percent is ".$number_percent."<br />";
$total=(($history[''order_total''])*$number_percent);
echo "total is ".$total."<br />";
And here is the output in the browser :
history[''order_total''] is $241.47
number_percent is 25
total is 0
WHY ? Any advice or pointers would be much appreciated!
推荐答案
number_percent =" 25";
echo " history [''order_total'']是"。
number_percent="25";
echo "history[''order_total''] is ".
history [''order_total'']。"< br />";
echonumber_percent is。
history[''order_total'']."<br />";
echo "number_percent is ".
number_percent。"< br />" ;;
number_percent."<br />";
这篇关于乘法数学不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!