Jump to content

simple math question


esoteric

Recommended Posts

What is the correct way to right a simple maths question

 

i have my total as:

<?php echo $row['total'];?>

 

i have my another number as:

<?php echo $row['user_credit']; ?>

 

but what i want to do is subtract the user_credit from the total and save it as a new variable called 'credits_used' but im unsure how to write it

 

do i do it like

$row['total'] - $row['user_credit'] = $row['credit_used'];

 

Thank for any help

Link to comment
https://forums.phpfreaks.com/topic/247545-simple-math-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.