Menu
My situation is that I have a <select> list within a form where multiple values may be selected and I would like to alter the way it’s values are formatted. Is there a dynamic or universal function that could be used so that the output changes from:
1,2,3,4
to:
1,2,3 and 4
Also, in the event that only one option is selected the verbiage “and ” wouldn’t be inserted just before the last value. Basically, if there is more than one value, “and ” is inserted just before the last value in the list.
Thank you so much to anyone who may be able to help me with this!