Good morning, I'm starting PHP programming and today we have sent a simple little exercise to practice. What asks us is that the two echo
are exactly the same, but in the first echo
of the variable $sql
if I show '2DAW' with the single quotes and in the other echo
in which I concatenate the variable $aula
shows me without single quotes.
<?php
echo "<h3>SIN VARIABLE</h3>";
$sql = "select * <br>
from alumnos <br>
where clase = '2DAW'";
echo $sql;
echo '<br><br>';
echo "<h3>CON VARIABLE</h3>";
$aula = "2DAW";
$sql = "select * <br>
from alumnos <br>
where clase = ".$aula;
echo $sql;
echo '<br><br>';
?>