I need to assign different class names to div elements within a loop.

```
<?php
    $sql="select * from category order by id desc";
    $catdata=$dbobj->db_get_data($sql);
    foreach ($catdata as $v) {
?>
      <div class="col-sm-3">
       <a href="javascript:void(0)" class="item-exhibitation maploc"><?php echo $v['name'] ?></a><!-- activemap1 -->
      </div>

 <?php } ?>

```

Here I need to keep the class name dynamic and all are given below:

```
$classarr = array("item-exhibitation maploc","item-parking maploc","item-offices maploc","item-storage maploc");

```

The above 4 are my classes and these will be assigned dynamically. After the 4th iteration, it will take from the first element in the array of class names. How can this be achieved?