Merge wp_get_post_terms

by Gamal Mohamed   Last Updated July 11, 2019 19:08 PM

I have this code

        while( $animes->have_posts() ) {
        $animes->the_post();
        $i++;
        $animeID[$i] = $post->ID;

        $args = array(
            'orderby' => 'meta_value_num',
            'order' => 'DESC',
            'fields' => 'all',
            'meta_query' => [['key' => 'episode_number','type' => 'NUMERIC',]]
        );

        $episodes[$i] = wp_get_post_terms(intval( $animeID[$i] ), 'episodes', $args );
        }
    }

I want to merge all $episodes[$i] in one array is it possible?

Tags : php


Related Questions