Title: oembed clone gives string nota array
Last modified: December 31, 2017

---

# oembed clone gives string nota array

 *  [phaidonas](https://wordpress.org/support/users/phaidonas/)
 * (@phaidonas)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/oembed-clone-gives-string-nota-array/)
 * Hello, i have created a meta box oembed with clone:
 *     ```
       array(
       				'id' => $prefix . 'oembed_1',
       				'type' => 'oembed',
       				'name' => esc_html__( 'Embed Video', 'media' ),
       				'desc' => esc_html__( 'Embed description', 'media' ),
       				'clone' => true,
       				'add_button' => esc_html__( 'Add video', 'media' ),
       				'sort_clone' => true,
       			),
       ```
   
 * it works very good except i can not get the videos with foreach
 * i have a vimeo and a youtube video.
 *     ```
       $values = rwmb_meta( 'oembed_1' );
       foreach ( $values as $value )
       {
       	echo do_shortcode( $value );
           ;
       }
       ```
   
 * it gives invalid argument to foreach.
 *     ```
       $oembeds = rwmb_meta( 'oembed_1' );
       echo $oembeds;
       Here it just shows both videos.
       ```
   
 * it does not return array as usual.
 * UPDATE:///it returns string not array
    -  This topic was modified 8 years, 5 months ago by [phaidonas](https://wordpress.org/support/users/phaidonas/).

The topic ‘oembed clone gives string nota array’ is closed to new replies.

 * ![](https://ps.w.org/meta-box/assets/icon-128x128.png?rev=1100915)
 * [Meta Box](https://wordpress.org/plugins/meta-box/)
 * [Support Threads](https://wordpress.org/support/plugin/meta-box/)
 * [Active Topics](https://wordpress.org/support/plugin/meta-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meta-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meta-box/reviews/)

## Tags

 * [oEmbed](https://wordpress.org/support/topic-tag/oembed/)

 * 0 replies
 * 1 participant
 * Last reply from: [phaidonas](https://wordpress.org/support/users/phaidonas/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/oembed-clone-gives-string-nota-array/)
 * Status: not resolved