Take the value stored in the database and save in a variable in php?

For example, suppose that in a column of my database, a value stored in the "sum" column equal to 1000, how can I take this value ("1000") and put it in a php variable to use this value ?