When I try to print variable "$ime", it just prints "Student: " on pdf file. I have tested it on html and it works fine displaying whole thing as is should. Sql result is not empty and it's just one row that displays name and last name. So normal output should be "Student: John Doe"
// Page header
function Header()
{
$db2 = new dbObj();
$connString2 = $db2->getConnstring();
mysqli_set_charset($connString2,'UTF-8');
$aaa = mysqli_query($connString2, "SELECT s.ime,s.prezime FROM Student s WHERE s.mbr='".$mbr."'") or die("database error:". mysqli_error($connString2));
$row=mysqli_fetch_row($aaa);
$ime ="Student: ".$row[0]." ".$row[1];
// Logo
$this->Image('img/logo.png', 85, 15, 30, '', 'PNG', '', 'T', false, 300, 'C', false, false, 0, false, false, false);
$this->SetFont('Arial','B',13);
// Move to the right
$this->Cell(80);
// Title
$this->SetFont('Arial','B',15);
$this->Cell(20,80,'Lista polozenih ispita',0,0,'C');
$this->Ln(10);
$this->Cell(80);
$this->SetFont('Arial','B',10);
$this->Cell(20,80,$ime,0,0,'C');
// Line break
$this->Ln(50);
}
Edit: It's not about variable scoping I have tried but it doesn't affect it in any way.