I'm new to php. This is my code
$retval = $conn->query("Select points from evaluation_log where session_id='{$sessionid}';");
$result=array();
$temp=array();
while($record = $retval->fetch_array(MYSQLI_ASSOC))
{
$result[]= $record;
}
The purpose of this query is to return multiple points against an id from the database which i'm storing in an array. Now I want to take sum of these points in the array. How should I do that.