I'm trying to get this PDO fetch to display the number of points a user has. However, I simply just get the output "array". What have I done wrong here, and is there an easier way to fetch a single row from a column than this?
// CONNECT TO DATABASE
require 'database.php';
// FETCH POINTS
$usernamedb = $_SESSION['user'];
echo $usernamedb;
$fetchpoints = $db->prepare("SELECT points FROM login WHERE username = '$usernamedb'");
$fetchpoints->execute();
$pointsfetched = $fetchpoints->fetchAll();
echo $pointsfetched;