I have code like such:
function myFunction(){
$types = getTypes();
for ($i = 0; $i < count($types); $i++) {
$projects = getProjects($types[i]);
echo "<div class='block'>";
for ($a = 0; $a < count($projects); $a++) {
echo "
<p>
<a href='{$projects[$a]["link"]}'>{$projects[$a]["title"]}</a>
{$projects[$a]["description"]}
</p>
";
}
echo " </div> ";
}
}
And then in an html file:
<section>
<?php myFunction(); ?>
</section>
Unless I set custom settings, beautifiers mess with the string formatting, I can't use double quotes, and all my html gets coloured the same way in any IDE. This had let me to believe this is not the way html is intended to be put in php scripts. What is the proper way of doing this?
{}.