I'm displaying a list of tags on my site which are formatted as CSV for every post.
Example: RFID, robots, decluttering
The CSV tags are stored in the MySQL database as one long string. I would like to make each tag a link that goes to the search page.
Example: search.php?tag=RFID or
search.php?tag=robots
I've found that I can explode the CSV to split it up, then print out the list which basically gives me what I started with. What I'm having problems with is formatting the array to add the links. Also, I would like to get rid of the array formatting [0]=> and place the commas back in between the tags.
My code looks like this:
<?php print_r(explode(',',$string)); ?>
This is my first post, so if you need more info just ask. If there is a better way to proceed please tell.
Thanks.