首页上一页 1 下一页尾页 1 条记录 1/1页
关于第三章例17的问题,请高手指正
发表在PHP图书答疑
2009-08-25
是否精华
是
否
版块置顶:
是
否
<?php
$a = -100;
$b = 50;
$c = 30;
echo "\$a =" .$a. ",";
echo "\$b =" .$b. ",";
echo "\$c =" .$c. "<p>";
echo "\$a+\$b=" .($a+$b). "<br>";
echo "\$a-\$b=" .($a+$b). "<br>";
echo "\$a*\$b=" .($a*$b). "<br>";
echo "\$a/\$b=" .($a/$b). "<br>";
echo "\$a%\$b=" .($a%$b). "<br>";
echo "\$a++=" .$a++. "";
echo "运算后\$a的值为:" .$a. "<br>";
echo "\$b--=" .$b--. "";
echo "运算后\$b的值为:" .$b. "<br>";
echo "++\$c=" .++$c. "";
echo "运算后\$c的值为:" .$c;
?>
此例中,倒数第二行echo "运算后\$c的值为:" .$c; 为什么是 .$c 而不是 .$c.;
用.$c.运行时提示出错,请高手指正。
$a = -100;
$b = 50;
$c = 30;
echo "\$a =" .$a. ",";
echo "\$b =" .$b. ",";
echo "\$c =" .$c. "<p>";
echo "\$a+\$b=" .($a+$b). "<br>";
echo "\$a-\$b=" .($a+$b). "<br>";
echo "\$a*\$b=" .($a*$b). "<br>";
echo "\$a/\$b=" .($a/$b). "<br>";
echo "\$a%\$b=" .($a%$b). "<br>";
echo "\$a++=" .$a++. "";
echo "运算后\$a的值为:" .$a. "<br>";
echo "\$b--=" .$b--. "";
echo "运算后\$b的值为:" .$b. "<br>";
echo "++\$c=" .++$c. "";
echo "运算后\$c的值为:" .$c;
?>
此例中,倒数第二行echo "运算后\$c的值为:" .$c; 为什么是 .$c 而不是 .$c.;
用.$c.运行时提示出错,请高手指正。