How to increment apex:variable?
In order to increment apex:variable inside the apex:pageBlockTable, we have to include it inside apex:column in apex:pageBlockTable. <apex:page controller="sample"> <apex:pageBlock > <apex:variable var="i" value="{!0}"/> <apex:pageBlockTable value="{!acnt}" var="acc"> ....