Hi, I'm using get_the_term and trying to give each list item an ID of the taxonomy name or taxonomy ID so I can target each li individually with CSS. The problem is I don't know how to escape certain characters so nothing I try is registering as PHP. Thanks in advance for any help.
echo get_the_term_list($post->ID, 'example', '<li id=" id ">', '</li><li id="">', '</li>' );
Output would be something like:
<li id="taxonomy-name"><a href="#" rel="tag">Taxonomy Name</a></li>