```
$array = new array('mike will made-it', 'miley cyrus', 'wiz khalifa', 'juicy j');

```

* If there is one element: **mike will made-it**
* If two **mike will made-it ft. miley cyrus**
* If more than two **mike will made-it ft. miley cyrus, wiz khalifa and
juicy j**

Here is what I have done so far but I think It is a simple and faster way to do this. 

```
public function get_artist() {
            $artists = 'Mike WiLL Made-It,Miley Cyrus,Wiz Khalifa, Juicy J';

            $artist_array = explode(',', $artists);

            if(sizeof($artist_array) == 1)
                return $artist_array[0];
            else if(sizeof($artist_array) == 2) {
                return $artist_array[0] . ' ft. ' . $artist_array[1];
            } else if(sizeof($artist_array) > 2) {
                //echo sizeof($artist_array);
                $ar = '';
                foreach($artist_array as $k=>$v) {
                        if($k == 0)
                            $v .= ' ft. ';
                        else if($k > 0 && ($k < (sizeof($artist_array) - 2)))
                             $v .= ', ';
                        else if($k == (sizeof($artist_array) - 1))
                            $v = ' and ' . $v;

                            $ar .= $v;
                }
                return $ar;
            }   
        }

```