Hi,
I looked through the archives but could not find anything quite like this. I'm new to PHP so any help appreciated.
I have an MySQL database populated with data passed via excel from a client. It includes an ArtistName field that contains both First name and Surname in the following format:
Surname, Firstname
I need to remove the comma and reverse the word order so that the name reads naturally, eg:
Firstname Surname
Is this possible using a standard str_replace as the data is pulled out of MySQL (how?) or would I be better spending the time to split the First Name and Surname data across two fields in the database so that I can print the order as I please?
Many thanks,
Gary Crighton