Fails to bring the sum of the column of database?

Trying to get the sum of a column in the database. Table numbers, 1 column. Try this:

function printResult ($result_set) {
 while (($row = $result_set--->fetch_assoc()) != false) {
 echo array_sum($row);
 echo "<br>";

$mysqli = new mysqli ("xxxxxxxx", "xxxxxx", "xxxxxxxxx", "xxxxxxxxx"); 
$mysqli->query ("SET NAMES 'utf8'"); 

/* check connection */
if ($mysqli->connect_errno) {
 printf("failed to connect: %s\n", $mysqli->connect_error);

$result_set = $mysqli->query ("SELECT * FROM `numbers`");
printResult ($result_set);

$mysqli->close (); 


Just displays all the numbers. Help
July 2nd 19 at 18:07
0 answer

Find more questions by tags MySQLWeb DevelopmentPHP