Good job !
I was thinking that it would be cool to have this feature... you made it !
All seems OK, but i think i found a little bug with the $separator.
In the two case (format = `a` or not), you do the following when you are closing the anchor tag :
.$value.'</a>, '.$separator.$nl;
or
..$value.'</a>, '.$separator.'</li>'.$nl;
I think that the ", " is too much after the anchor closing. It is the job of the $separator variable to do that.
Other thing, you always put the separator... also for the last item. I don’t thing it it that we want.
In my case, if i have only one tag (it’s a category), it shows: "my category,".... Year, i think we should not put the separator for the last entry....
You should replace the foreach by another buckle to do the job on all entry but not the last one... the last one is to be build outside the buckle.
All other thing are OK and great !!!
Thanks !
Totor.
www.totor.fr