I am trying to insert PHP variables into a text that is saved in my MySql, so that they are automatically read in my application. First, let me explain what my reality is:
Print page:
<?php
//PRIMEIRO, FAÇA A BUSCA POR ALGUNS VALORES DO BD.
//EXEMPLO: $variavel1, $variavel2, etc...
?>
//TEXTO PADRÃO EM HTML (para impressão):
// PERCEBAM QUE INCLUO AS VARIAVEIS PHP DENTRO DO TEXTO
Número do contrato: <?php echo $variavel1;?><br>
Nome: <?php echo $variavel2;?><br>
Endereço: <?php echo $variavel3;?>
//AQUI VAI O RESTANTE DO TEXTO DO CONTRATO ....
Instead of keeping this text static, so I only change the value of the variables, I would like to register it also in the bd, so that it is easier for me to change it. It looks like this:
//TEXTO SALVO NO BD:
Número do contrato: {contrato}
Nome: {nome}
etc...
DAI, when I run the application, it already loads the data automatically.
In this way, I could both change the text as well as the place variables. Is it possible?