# Add 2 columns with php

**URL:** <https://forum.kirupa.com/t/add-2-columns-with-php/116030>\
**Category:** Uncategorized\
**Created:** [July 14, 2004, 12:20am UTC](https://forum.kirupa.com/t/add-2-columns-with-php/116030 "2004-07-14T00:20:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lbeetles](https://avatars.discourse-cdn.com/v4/letter/l/2bfe46/32.png) [@lbeetles](https://forum.kirupa.com/u/lbeetles)\
**Post date:** [July 14, 2004, 12:20am UTC](https://forum.kirupa.com/t/add-2-columns-with-php/116030/1 "2004-07-14T00:20:51Z")

</div>

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???
