📜  无法使用while循环php代码示例求和并获得相同的值

📅  最后修改于: 2022-03-11 14:53:53.595000             🧑  作者: Mango

代码示例1
$i = 1;
$var_startVal = 500;
$var_endVal = 500;
$var_amount = 50;

while( $i <= 65 ) {
  $var_startVal += 500;
  $var_endVal += 500;
  $var_amount += 50;

  $startVal = 35501, $var_startVal;
  $endVal = 36000, $var_endVal;
  $amount = 3575, $var_amount;
  echo "array(
"; echo "'low' => '".$startVal."',
"; echo "'high' => '".$endVal."',
"; echo "'amount' => '".$amount."',
"; echo '\'city\' => $city
'; echo "),
"; $i++; }