<?php $range = range(1,5); $text = implode(', ', $range); $text = preg_replace('/, (?=[^,]+$)/',' and ', $text); echo $text;
You have javascript disabled. You will not be able to edit any code.