Can anyone tell me if it is possible to take an array and format it for HTML so there is a comma between each variable BUT for the last one, there is a 'AND'
In the MySQL database, the variable has:
Aerobics,Hunting,Walking,Hiking,Fishing
What I would like to do is take that from the database and format in the browser as:
The activities which I like to do are:
Aerobics, Hunting, Walking, Hiking and Fishing
- Please note the 'and' before 'Fishing'
That is what I am attempting to accomplish but I am not able to find any information on how to format in this fashion.
Any help would be greatly appreciated.
Thanks