Support

Account

Home Forums Front-end Issues Row index at 2 have_row

Helping

Row index at 2 have_row

  • Hi everyone,

    I have an issue when, i loop with “have row” the row index is on 2 not 1.

    if( have_rows('dates',$current_project ) ):
    $i=0;
    
     	// loop through the rows of data
    			    while ( have_rows('dates', $current_project) ) : the_row();
    			    	
    			        // display a sub field value
    
    			        		$row_date[$i]["date"] = get_sub_field('date');
    
    			        		$row_date[$i]["value"] = get_sub_field('current_value');
    
    			        		$selecteur = get_sub_field('test-selecteur');
    			        		$location_first = get_sub_field('localisation');
    			        		$row_date[$i]['localisation'] = $location_first->ID;
    			$i++;			
    			    endwhile;

    When i print the row index he start to “2”…

    Thank you in advance

  • Hello, no idea for this issue?

    Thank you

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.