I want to replace this code:
$html=<<<EOF
<p>{${$var[i]}[name]}</p>
<p>{${$var[i+1]}[name]}</p>
<p>{${$var[i+2]}[name]}</p>
<p>{${$var[i+3]}[name]}</p>
EOF;
with something like this:
$html=<<<EOF
<p>{${$var[new_i]}[name]}</p>
<p>{${$var[new_i]}[name]}</p>
<p>{${$var[new_i]}[name]}</p>
<p>{${$var[new_i]}[name]}</p>
EOF;
and preserve functionality of the first piece of code.
Is it possible or not?
Post-Increment to the rescue!
Although if you are just going to display
$htmlright after this, it might be better to do: