Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Unable to do sum and getting same value by using while loop php

$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(<br>";
    echo "'low'     => '".$startVal."',<br>";
    echo "'high'    => '".$endVal."',<br>";
    echo "'amount'  => '".$amount."',<br>";
    echo ''city'    => $city<br>';
  echo "),<br>";
  $i++;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Unable #sum #loop #php
ADD COMMENT
Topic
Name
9+8 =