Support

Account

Home Forums ACF PRO Get specific row from repeater field Reply To: Get specific row from repeater field

  • @scheurta That didn’t work for me.

    But this one does!
    Just basic PHP manipulating arrays.
    First, create and fill the array:

    while( have_rows('verzoeken') ): the_row();
    $my_data[] = get_row();
    endwhile;

    After that, get the correct field values (you have to use the field keys):

    $row_index = $row_index - 1;
    $date = $my_data[$row_index][field_5791d60e83187];
    $description = $my_data[$row_index][field_5791d60e83188];

    I got the row index in another part of my script from get_row_index(), so I have to subtract that with 1 because the array index starts at 0 and get_row_index() starts at 1.