Not working code?

<?php
 $sql = "SELECT * FROM users";
 $result = mysql_query($sql) or die(mysql_error());

 while ($row = mysql_fetch_assoc($result))
{

 $table = $row['btc'];
 $sum ="0.0002";
 $chet= $table - $sum;

}

echo $chet;

 ?>

btc I take from DB
Not working. please help.
June 3rd 19 at 19:33
1 answer
June 3rd 19 at 19:35
<?php
 $sql = "SELECT * FROM users";
 $result = mysql_query($sql) or die(mysql_error());

 while ($row = mysql_fetch_assoc($result))
{

 var_dump($row); 

}

?>


Look at what the data returns.

Find more questions by tags PHPMySQL