php - Calculating total -


i'm looking on calculating total lots of subtotals database, code i'm using working calculate it, php echos error saying

notice: undefined variable: tot in ..............\viewing.php on line 192

but still calculating total cost , echoing it, ideas on how rid of error?

i getting subtotals database using this:

while($row=mysql_fetch_array($result)) {  echo ..... $tot += $row['subtotal']; } 

at bottom of page, i've made shows total , working, still giving me error saying variable tot undefined, ideas?

it isn't error, it's notice!

initialise

$tot = 0; 

before while loop


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

java - SmsManager sending message more than one -