Auto increment a # in a repeat region
I am trying to make a slider that is connected to a recordset. However for each repeated region it needs to increment up one number.
Original code that needs to increment.
First slide needs to be:
<div id="p7HGMpn_1_1" class="p7HGM_panel">
<div id="p7HGMpc_1_1" class="p7HGM_panel_content">
The next slide repeated from the RS (and so on incrementing one number) needs to be:
<div id="p7HGMpn_1_2" class="p7HGM_panel">
<div id="p7HGMpc_1_2" class="p7HGM_panel_content">
I tried making a variable and placing it in the slide but no joy.
Here is how I tried:
My variable :
<?php $i = 1;?>
Then placed it:
<div id="p7HGMpn_1_<?php echo $I = $i + 1;?>" class="p7HGM_panel">
<div id="p7HGMpc_1_<?php echo $I = $i + 1;?>" class="p7HGM_panel_content">
Parsed code for every panel comes out:
<div id="p7HGMpn_1_2" class="p7HGM_panel">
<div id="p7HGMpc_1_2" class="p7HGM_panel_content">
I understand why it does not work but I can not figure out how to make it work.