I'm trying to create small sections of HTML code with a loop. In the loop I want to take each text value of $start_intro_headline_X in the simplified code below. How can I solve this?
$start_intro_headline_0 = "This is the first headline";
$start_intro_headline_1 = "This is the second headline";
$intro_sections ="";
for ($x = 0; $x <= 4; $x++) {
$intro_sections .= "<h2>{$start_intro_headline_{$x}}</h2>"; <-- THIS LINE IS THE PROBLEM!
}
$pageContent = <<<EOD
$intro_sections
EOD;