定义带参数的函数

<?php 
    function sum($a,$b){
        $total=$a+$b;
        echo "x+y=$total";
    }
    $x=100;
    $y=1;
    sum($x, $y);
?>

定义带参数的函数

猜你喜欢

转载自blog.csdn.net/weixin_41737295/article/details/89317430