Add 2 columns with php

I have a mySql db and i am outputting it with php. What i want to do is add 2 columns in the db and then output it as 1 number i.e. col1=2 + col2=2 total=4.

Does anyone know how i can do this???

$row[‘col1’] + $row[‘col2’] = result :slight_smile:

cheers i sorted it out.

$result = $row[‘col1’] + $row[‘col2’]