obal $title;

    $this-&gt;SetFont('Arial', 'B', 15);
    $this-&gt;Cell(0, 10, $title, 1, 1, 'C');
}

$title = 'My title';</code></pre>
</div>
Alternatively, you can use an object property:
<div class="doc-source">
<pre><code>function Header()
{
    $this-&gt;SetFont('Arial', 'B', 15);
    $this-&gt;Cell(0, 10, $this-&gt;title, 1, 1, 'C');
}

$pdf-&gt;title = 'My title';</code></pre>
</div>
</li>

<li id='q6'>
<p><b>6.</b> <span class='question'>I have defined the Header and Footer methods in my PDF class