I am trying to get 1 item from an associative array that I am outputting form an ACF field.
I am doing the following:
print_r(get_field('consultant_name'));
This is on the ACF field where I can select a specific user from a specific role.
The output of this is:
Array ( [ID] => 42 [user_firstname] => Sarah [user_lastname] => Piddington [nickname] => sarah_piddington [user_nicename] => sarah_piddington [display_name] => Sarah Piddington
The only part I need from this is the ID but im not sure how to access this on its own? Could somebody advise me if this even possible? I need it to use as a comparison.