I have an array ($number_list) that has a dynamically generated list of values. There will be at least 1 value in the array and no more than 4.
$number_list
Currentl
# pop the last element off the array and formate text if( count( $number_list )>1 ){ $and = " and ".array_pop( $number_list ); }else{ $and = ''; } # Implode number list , and append $and $comma_list = implode(', ', $number_list).$and;