I need the following setup:
<ul>
<li>8</li>
<li class="active">9</li>
<li>10</li>
</ul>
I am trying to do this with php heredoc:
$pos = $_GET["pagination"];
$pagination = <<EOD
<ul>
<li>{$pos-1}</li>
<li class="active">$pos</li>
<li>{$pos+1}</li>
</ul>
EOD;
But I get error:
Parse error: syntax error, unexpected token "-", expecting "->" or "?->" or "{" or "[" in ...
The only other solutions I can think of is using multiple variables or a function in heredoc. I think there must be a straight forward way to achieve this.