I'm having trouble on using a pdo based function
my GetCurrentLanguage()
function returns an int of 0 or 1
public function GetCurrentLangName()
{
$stmt = $GLOBALS['website']->prepare("SELECT * FROM available_languages WHERE id = :id");
$stmt->bindParam(':id', $this->GetCurrentLanguage(), PDO::PARAM_INT);
$stmt->execute();
$fetch = $stmt->fetchAll();
return $fetch['name'];
}
and is not working, it returns
Notice: Undefined index: name