Search
 
SCRIPT & CODE EXAMPLE
 

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++;
}
Comment

PREVIOUS NEXT
Code Example
Php :: does xampp install php 
Php :: How to remove from a multidimensional array all duplicate elements including the original 
Php :: Laravel get all parent categories for each category 
Php :: how to enable autoreload on save 
Php :: update php local 
Php :: Allowed memory size of 33554432 bytes exhausted (tried to allocate 8192 bytes) 
Php :: how to fetch associate data from csv in php 
Php :: php sum array values by key 
Php :: envoyer des donnees js a php 
Php :: laravel filesystem 
Php :: laravel search and return record with pagination 
Php :: install php7 
Php :: set border phpoffice phpexcel 
Php :: laravel show method 
Php :: $ whereis php terminal mac 
Php :: update to php 7.4 
Php :: manual collection laravel 
Php :: laravel get route action 
Php :: get ids from object 
Php :: firebase realtime database get all data 
Php :: php throw fatal error 
Php :: insert javascript in php 
Php :: what is Trustproxies handle in laravel 
Php :: laravel enable query log 
Php :: php arrays 
Php :: create controller codeigniter 3 
Php :: find_in_set in laravel 
Php :: :: in php 
Php :: drop column laravel migration 
Php :: how to develop package beside laravel project 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =