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!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.