Site icon Hip-Hop Website Design and Development

divide customized discipline values in div each two values

i’ve this html mark-up to type some information

<div class="row">
<div class="col-xs-2">
  <img src="pictures/member-schools/ms1.jpg" class="img-responsive">
</div>
<div class="col-xs-4">
  <h4>American Worldwide Faculty - East</h4>
</div>
<div class="col-xs-2">
  <img src="pictures/member-schools/ms2.jpg" class="img-responsive">
</div>
<div class="col-xs-4">
  <h4>Dover American Worldwide Faculty</h4>
</div>

and i’m pulling out the information from repeatable group metabox i take advantage of from CMB2

that is the code for the registered metabox

operate faculties() {

// Begin with an underscore to cover fields from customized fields listing
$prefix = 'schools_';

/**
 * Repeatable Area Teams
 */
$faculties= new_cmb2_box( array(
    'id'           => $prefix . 'metabox',
    'title'        => __( 'faculties', 'cmb2' ),
    'object_types' => array( 'web page', ),
    'show_on'      => array( 'key' => 'id', 'worth' => 6 ),
    'closed'     => true,
) );

$group_field_id = $schools->add_field( array(
    'id'          => $prefix . 'discipline',
    'sort'        => 'group',
    'choices'     => array(
        'group_title'   => __( 'Slide {#}', 'cmb2' ), // {#} will get changed by row quantity
        'add_button'    => __( 'Add One other Slide', 'cmb2' ),
        'remove_button' => __( 'Take away Slide', 'cmb2' ),
        'sortable'      => true, // beta
    ),
) );


$schools->add_group_field( $group_field_id, array(
    'title' => __( 'Picture', 'cmb2' ),
    'id'   => 'photograph',
    'sort' => 'file',
) );

$schools->add_group_field( $group_field_id, array(
    'title' => __( 'Identify', 'cmb2' ),
    'id'   => 'title',
    'sort' => 'textual content',
) );}

i pull the information out by means of this code

$faculties = get_post_meta( get_the_ID(), 'schools_field', true );

the place $faculties is an array that comprise a picture and title for every entry which i can loop by means of to drag out the values.
my query is how i can add <div class="row"> each two objects from that array , as a result of i want a row for every two entries

EDIT: var_dump end result

array(3) {
    [0] => array(3) {
        ["photo_id"]    => string(2) "89"
        ["photo"]       => string(56) "http://localhost/NCSR/wp-content/uploads/2015/06/ms3.jpg"
        ["name"]        => string(8) "Faculty 1" 
    }
    [1] => array(3) {
        ["photo_id"]    => string(2) "88"
        ["photo"]       => string(56) "http://localhost/NCSR/wp-content/uploads/2015/06/ms2.jpg"
        ["name"]        => string(8) "faculty 2"
    }
    [2] => array(3) {
        ["photo_id"]    => string(2) "87"
        ["photo"]       => string(56) "http://localhost/NCSR/wp-content/uploads/2015/06/ms1.jpg"
        ["name"]        => string(8) "faculty 3"
    } 
}