This is a good class, an improvement on it might be that the script reads the file and outputs the data automatically without having to specifically reference the array numbers as a developer can read the code and change it to suit their needs but a typical user may lack the knowledge to do that.
I noticed that in your example, you have included phone numbers that are incorrectly formatted, just so you know if you put an apostrophe in front of the number then it will be interpreted with a number that allows 0's on the front. You can then use your script to print phone numbers of contacts.
I think you have just put this in a safe guard but if a user wants to define their own fields and the array is not defined then the whole output fails and the vcard is not produced. maybe an error message would point the user in the right direction if they want to introduce their own fields.
Thanks for the class
|2013-01-22 10:51:13 - In reply to message 1 from Darren Conyard|
Thanks for the observation.
I'll do the needful.