Getting an entry's tags I'm trying to find a way to get tag data from a Model. Currently, I have a template that makes use of tags in an entry like this:

Codes: {% for tag in entry.codes %} {{ tag.title }}; {% endfor %}


When I create this template, I also need to send some of the data (specifically this data) to an API. Assuming I have an $entry object, how do I iterate through the tags that I need, or get an array with all the tags associated with an entry?
If you have $entry, you should be able to get the tags by the field name, (codes, in your case). 

$tags = $entry-&gt;codes;
foreach($tags as $tag)
{
    echo "&lt;li&gt;".$tag-&gt;title."&lt;/li&gt;";
}