Hi,
I have this code for looping through clonable subfields.
This is what return the print_r:
Array ( [huis_1_featured_sf] => Array ( [0] => Een pan [1] => Een bed [2] => Een kast ) )
The foreach is wrong, nothing is returned. What is wrong?
<?php
$group_key = 'huis_1_test';
$sub_field_key = 'huis_1_featured_sf';
$group_values = rwmb_meta( $group_key, ['object_type' => 'setting'], 'website' );
print_r ($group_values);
foreach ( $group_values as $group_value ) {
$value = isset( $group_value[$sub_field_key] ) ? $group_value[$sub_field_key] : '';
echo $value; // Display sub-field value
}
?>