我的代码:
$gettotz=0;
while($mycartqry=mysqli_fetch_array($cartqry)){
$one=$mycartqry['nos'];
$two=$gettotz;
echo $gettotz.=$myVar+$myVar2;
}
db viz 中有两个值,即 10 和 12。我的答案是 01012。我的答案应该是 22...请帮助
应该是这样的:
$gettotz=0;
while ($mycartqry=mysqli_fetch_array($cartqry)){
$one = $mycartqry['nos'];
$gettotz += $one;
// what is `$myVar` and `$myVar2` is unclear
// but if they exists you can also add'em:
// $gettotz += $one + $myVar + $myVar2;
}
echo $gettotz;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句