- array_slice: documentation ( source)
- implode: documentation ( source)
- explode: documentation ( source)
<?php
$str = 'Person ONE, Person TWO, Person THREE';
$strArr = explode(',', $str);
if(count($strArr) > 2){
//echo trim($strArr[0]).', '.trim($strArr[1]).'...';
$temp = array_slice($strArr,0,2);
echo implode(',',$temp).'...';
}else{
echo $str;
}