I’m a PHP newbie and I’ve done some googling and Stack Overflowing, but I haven’t had much luck figuring out something that seems like it should be relatively simple. Here’s my question:
When echoing $x->tags(), is it possible to strip out the comma character which follows each tag? I’m using a foreach loop for list items which represent individual pages, and I’d like to pass each li an array of classes that correspond with the tags associated with that page. The current output of class=“tag1, tag2, tag3” is making this difficult.
Interestingly, I had to insert a blank space in between the second pair of quotes before it would actually replace the comma characters, but I’ll dig into that later. Thanks so much, this is great!