<div class="tables-section-r" id="capture">
    <div class="row">
    <div class="tables">


        <?php foreach($rowsSeries as $row): ?> 
            <?php foreach($row as $i): 
                    $table_type = "r";
                    if(isset($i['3']) && $i['3'] == "s" ) $table_type = "s";
            ?>

        <div  class="table table-<?=$table_type?> <?=($i[0] == null)?(" null "):("")?>">
            
            <?php if($i[0] != null): 
            
                if($i[0] >= 0 && $i[0] <=9) $i[0] = "0" . $i[0];
            ?>

                <h5>T<?=$i[0]?></h5>
                <?php echo view('plans/parts/seat', array('i' => $i)); ?>
            
            <?php endif; ?>
            
        </div>
            <?php endforeach; ?>
        <?php endforeach; ?>

    </div>
    </div>

</div>