I'm having a problem looping through my array to get just one value each time. I want to gray only 1 value because I'm calling that value in jquery. I'm new and sorry if this is too basic but I've been trying for days, pulling my hair out!
$designslist = array('design1','design2','design3','design4');
$current_index = 0;
$current_id = current($designslist);
$next = $designslist[$current_index + 1];
foreach( $designslist as $value )
{
if( $value !== $next )continue;
$nexts = $next;
echo $nexts;
$current_index++;
}
Inside my html
<a href="#" id="<?php echo $nexts; ?>">next</a>
calling the id with jquery
$('#design1').on('click',function() {
$('#web1').removeClass().addClass('big1');
});
<a href="#">anchors. This is a leftover from html 3.2, under html5 (and html 4.01) rules, this link will actually take you to the top of the page.