Home › Forums › Backend Issues (wp-admin) › Unique combinations from two checkbox fields › Reply To: Unique combinations from two checkbox fields
The only way to do this is to loop through one array and a nested loop through the second array and concatenate each value individually. There is no single php function that will automatically do this work.
$class = get_field('AAA');
$tijd = get_field('BBB');
$value = array();
foreach ($class as $a) {
foreach ($tijd as $b) {
$value[] = $a.$b;
}
}
$value = implode(', ', $value);
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.