1
I have the following PHP query
$mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE);
$mysqli-> set_charset("utf8");
$stmt = $mysqli->prepare("select header, title, footer, head from configs");
$stmt -> execute();
$stmt -> bind_result($header, $title, $footer, $head);
$stmt -> fetch();
echo $header;
But when will I give the echo
in the $header
the code <?=$teste?>
that is in the database comes as an exclamation and two tracts before the interrogation, causing the code does not appear, inspecting I can see that the variable is in green. Why?
As the documentation itself says, starting with PHP 5.4 you can use
<?=
without fear of being happy, because this configuration directive does not affect you.– gmsantos