Home › Forums › General Issues › Comparing get_fields() with $_post['acf'] orders are flipped › Reply To: Comparing get_fields() with $_post['acf'] orders are flipped
Thank you for your reply.
Because I wanted some sort of custom order and not have it completely random, I created this function
I would just like it to share and have this issue resolved. What I did was create a list of fields I wanted to see in the email (not all the fields are relevant) and have them in the order seen in the array
$arrayKeysOldItems next I compared the
$_post['acf'] array stored in
$arrayKeysNewItems and had them ordered the same as the previous array. Than I just looped through all the items in the first array and compared them with the values of the new array and if they were different I add them to the email.
In my final code I also do some converting of sting to
time stamps because not all the values are in the same way stored, but that would just clutter up this code.
Thanks again for your feedback! Seems like a much easier solution!
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!