I am trying to generate a pdf with data collected in a form with PHP. The library that I am using is mPDF
<?php
$cliente = $_POST['cliente'];
$direccion = $_POST['direccion'];
$telefono = $_POST['telefono'];
require_once('pdf/mpdf.php');
$html = '
<div class="datos">
<p> <?php echo $cliente; ?> </p>
<p> <?php echo $direccion; ?> </p>
<p> <?php echo $telefono; ?> </p>
</div>';
$mpdf = new mPDF('c', 'A4');
$css = file_get_contents('css/pdf.css');
$mpdf->writeHTML($css, 1);
$mpdf->debug = true;
$mpdf->writeHTML($html);
$mpdf->Output('reporte.pdf', 'I');
?>
At the time of generating the pdf, it shows me the PHP code as plain text. Is there any way to show the data inside the variables?