Increasing php array by 1 inside jQuery each function : <p>I'm struggle to find an answer for this so was hoping to hear from the community.</p>

<pre><code>$('.slick-dots button').each(function(index) {
    $(this).html('&lt;?php echo $headings[0]; ?&gt;')
});
</code></pre>

<p>Within the above .each function, I am trying to increase $headings[0] by one on each loop.</p>

<p>Hopefully I'm missing something pretty simple and I've not gone down an impossible route?</p>
