calculate the difference of each values of array

后端 未结 2 639
名媛妹妹
名媛妹妹 2021-01-23 12:46

Newbie here in PHP programming. I have some question regarding arrays. How can I get the difference between adjacent values in an array?

$value = array(2, 5, 9,          


        
2条回答
  •  有刺的猬
    2021-01-23 13:16

    @Gumbo you added $diffs = array(); it has to be $value

    ";
    print_r($diffs);
    echo "
    "; ?>

提交回复
热议问题