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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.