My db table looks like that

I'm trying to get page title and content from this function
function page($current, $lang){
global $db;
$txt='txt_'.$lang;
$title='title_'.$lang;
$data=$db->query("SELECT '$txt', '$title' FROM pages WHERE `id`='$current'");
$data=$data->fetch_array(MYSQLI_BOTH);
return $data;
}
Then at the beginning of the index page getting array values
$data=page($id, $lang);
And using like this example
<title><?=$data[1]?></title>
But getting every time the same result title_en (en is my language variable.). What's wrong with my code?