I have a code like this:
for($j=1;$j<3;$j++)
{
$output.='
<span id="<?php echo "delete-".$j; ?>">
<?php echo $j; ?>
</span>
';
}
Inside for loop I am using the HTML code. And I am trying to access the $j value inside for loop using php 'echo()'. But I am not getting the $j value inside php tags. How to get $j values inside php tags?
I need the output value like
<span id="delete-1">1</span>
<span id="delete-2">2</span>
<span id="delete-3">3</span>