I know that as such, in HTML you can not use the conditional if, but with PHP you can integrate perfectly.
What I'm looking for is that instead of doing the conditional completely in PHP:
<?php
if (condicion) {
echo "<p>hola</p>";
} else {
echo "<p>adios</p>";
}
?>
Implement better PHP and that the HTML does not have to carry echo
for each element.
<?php if (condition): ?>
<p>Hola</p>;
<?php else if (condition): ?>
<p>Adios</p>;
<?php endif; ?>
From what I see, the part of the code <?php else if (condition): ?>
does not exist, or is not written like that, but I can not find a way to do it, or do I have to do each conditional separately?