here is my code-
$sql="SELECT * FROM payment WHERE customerid='$id'";
if ($result=mysqli_query($con,$sql))
{
while ($row=mysqli_fetch_assoc($result);
{
echo $row['fraction_payment'];
}
}
What im trying to do: constantly keep adding $row['fraction_payment']
with the previous value.
if database value of
fraction_payment 1 = 100
fraction_payment 2 = 200
fraction_payment 3 = 300
expected result will be:
$row['fraction_payment'][1] = 100
$row['fraction_payment'][2] = 300
$row['fraction_payment'][3] = 600
How should i proceed to do that in PHP?