Convert imploded plain text into links
<p>I'm completely open on how to do this:</p>

<p>I have the line:</p>

<pre><code>echo implode(', ',get_field('categories'));
</code></pre>

<p>Which is outputting this:</p>

<pre><code>Branding, Web, Print
</code></pre>

<p>I have 20 or so options it can output depending on what checkboxes were ticked.</p>

<p>At the moment, what it's outputting is just plain text. How can I make each tag a link? The link would need to be unique per tag so:</p>

<pre><code>&lt;a href="tags/design/branding"&gt;Branding&lt;/a&gt;, &lt;a href="tags/design/web"&gt;Web&lt;/a&gt;, &lt;a href="tags/marketing/print"&gt;print&lt;/a&gt; 
</code></pre>

<p>UPDATE:
The first part of the question is working thanks to Brady. I now have an additional question -</p>

<p>Using Brady's answer on the line:</p>

<pre><code>$elements[] = '&lt;a href="/tags/design/' . strtolower($category) . '" title="' . $category . '"&gt;' . $category .'&lt;/a&gt;';
</code></pre>

<p>If you look at the href it has the link /tags/design/, some of the tags it's outputting are using the correct link but some are from another section and the link should be /tags/marketing/. How can I account for this? (Not that I know how to do this, someone will need to show me!) Could I create an array with the tags "Branding, Web, Print" and if the $category variable matches this then give it the variable $design. Could I then create another array with "Advertising, Analysis, Campaign" and give it the variable $marketing if the $category matches that. Then in the link I could put href="/tags/$design/$category" or href="/tags/$marketing/$category"?</p>

<p>So a couple of examples would be (I'll put them as normal links):</p>

<p>From the design section:</p>

<pre><code>&lt;a href="/tags/design/branding"&gt;Branding&lt;/a&gt;
&lt;a href="/tags/design/web"&gt;Web&lt;/a&gt;
&lt;a href="/tags/design/print"&gt;Print&lt;/a&gt;
</code></pre>

<p>From the marketing section:</p>

<pre><code>&lt;a href="/tags/marketing/advertising"&gt;Advertising&lt;/a&gt;
&lt;a href="/tags/marketing/analysis"&gt;Analysis&lt;/a&gt;
&lt;a href="/tags/marketing/campaign"&gt;Campaign&lt;/a&gt;
</code></pre>

<p>There are only two sections design and marketing, within those sections there are several tags, if that makes sense. The sections in WP are setup like this:</p>

<p>tags > design > (each tag - branding, web, print is it's own page).
tags > marketing > (each tag - advertising, analysis, campaign is it's own page).</p>
