# Need help with something similar to a blogs tag system

**URL:** https://forum.kirupa.com/t/need-help-with-something-similar-to-a-blogs-tag-system/324708
**Category:** programming
**Created:** [September 4, 2011, 10:40pm UTC](https://forum.kirupa.com/t/need-help-with-something-similar-to-a-blogs-tag-system/324708 "2011-09-04T22:40:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Zaxza](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zaxza/32/2227_2.png) [@Zaxza](https://forum.kirupa.com/u/Zaxza)
#### Post date: [September 4, 2011, 10:40pm UTC](https://forum.kirupa.com/t/need-help-with-something-similar-to-a-blogs-tag-system/324708/1 "2011-09-04T22:40:58Z")

</div>

Hi i have a mysql table called artists.  
here’s the structure:

[TABLE=“class: grid, width: 500”]  
[TR]  
[TD]ID[/TD]  
[TD]Name[/TD]  
[TD]Type[/TD]  
[/TR]  
[TR]  
[TD]1[/TD]  
[TD]Son Capson[/TD]  
[TD]Musician[/TD]  
[/TR]  
[TR]  
[TD]2[/TD]  
[TD]Aeron[/TD]  
[TD]Musician,Photographer[/TD]  
[/TR]  
[TR]  
[TD]3[/TD]  
[TD]Simon Lovatt[/TD]  
[TD]Sound Engineer[/TD]  
[/TR]  
[/TABLE]

On my artist page I have it set up so that you can filter by type using ‘artists.php?type=’  
But to make it easier for users I want to be able to display all the types with their relevant links such as…

```php
<a href="artists.php?type=<? echo $type; ?><? echo $type; ?></a>

```

I can do this, using a select query however I want to be able to prevent repeated types and explode types with more than one value such as number 2 in the table.

I’ve tried searching but can’t find anything that similar to this, I thought it would be a more common problem. I have a very basic understanding of php so any advice is greatly appreciated.

I guess this could be compared to a tag system in a blog, yet still I can’t find the answer to my problem. Thanks in advance.

Nick Warren
