Home › Forums › Add-ons › Repeater Field › Combine 2 repeater rows with same values › Reply To: Combine 2 repeater rows with same values
Sorry, I will try to illustrate below:
pigeons_and_doves is an acf repeater that collects one set of data with two keys
other_pigeons_and_doves is an acf repeater that collects one set of data with two keys
when combining them into the array with this sort method it is listing them as
pigeons_and_doves key values first
A some name in list (pigeons_and_doves)
Z some name in list (pigeons_and_doves)
X some name in list (pigeons_and_doves)
other_pigeons_and_doves key values first
F some name in list (other_pigeons_and_doves)
B some name in list (other_pigeons_and_doves)
D some name in list (other_pigeons_and_doves)
so when they are run out in the loop that you advised with the usort they are displaying like this: (pigeons_and_doves all at top of list and other_pigeons_and_doves all at bottom of the list)
A some name in list (pigeons_and_doves)
X some name in list (pigeons_and_doves)
Z some name in list (pigeons_and_doves)
B some name in list (other_pigeons_and_doves)
D some name in list (other_pigeons_and_doves)
F some name in list (other_pigeons_and_doves)
INSTEAD OF LIKE THIS
A some name in list (pigeons_and_doves)
B some name in list (other_pigeons_and_doves)
D some name in list (other_pigeons_and_doves)
F some name in list (other_pigeons_and_doves)
X some name in list (pigeons_and_doves)
Z some name in list (pigeons_and_doves)
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.