Support

Account

Home Forums Add-ons Repeater Field Can't create array with repeater sub_field Reply To: Can't create array with repeater sub_field

  • Hi i managed to create the single array:

    $addmore_deadline_cat_fees = array();
    if (have_rows('add_more_deadlines')):
    while (have_rows('add_more_deadlines')) : the_row();
    
        $array = array();
    
        if (have_rows('categories_and_fees')):
        while (have_rows('categories_and_fees')) : the_row();
        
            $array_val = get_sub_field('fee');
        
            array_push($array,$array_val);
        
        endwhile;endif;
        
        $addmore_deadline_cat_fees = array_merge($addmore_deadline_cat_fees, $array);
    endwhile;endif;
    print_r($addmore_deadline_cat_fees);