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
If the list has at least two elements at the end, you can implode them with " and " (or if your question wasn't borked ", and ") already.
" and "
", and "
Then you implode the whole array with ", ".
", "
Example:
Demo: https://eval.in/45277