How to get a PDO Fetch( ) to return as string
You can do it like this:
echo $stmt->fetchColumn();
Or:
$result = $stmt->fetch(PDO::FETCH_ASSOC);
echo $result[0];
You can do it like this:
echo $stmt->fetchColumn();
Or:
$result = $stmt->fetch(PDO::FETCH_ASSOC);
echo $result[0];