O
Oh C
Guest
I'm writing my own blogging script, eveerything going great, its just a little snippet I get caught on working on tags.
Heres how I read each tag from the database:
$tags = $row['tags'];
// Each tag is seperated by a comma, so split to get each individual
$get_tags = split(",", $tags);
foreach($get_tags as $t) {
echo "$t,";
}
Thats all good anf fine.
My question is how can get rid of the comma after that last tag?
I only want the comma to be displayed after every tag but the last....
sort of like this:
<a href="http://tinypic.com" target="_blank"><img src="http://i44.tinypic.com/16qxcj.png" border="0" alt="Image and video hosting by TinyPic"></a>
any answers are greatly appreciated!
NEVERMIND, I FIGURED THE SOLUTION OUT MYSELF
Heres how I read each tag from the database:
$tags = $row['tags'];
// Each tag is seperated by a comma, so split to get each individual
$get_tags = split(",", $tags);
foreach($get_tags as $t) {
echo "$t,";
}
Thats all good anf fine.
My question is how can get rid of the comma after that last tag?
I only want the comma to be displayed after every tag but the last....
sort of like this:
<a href="http://tinypic.com" target="_blank"><img src="http://i44.tinypic.com/16qxcj.png" border="0" alt="Image and video hosting by TinyPic"></a>
any answers are greatly appreciated!

NEVERMIND, I FIGURED THE SOLUTION OUT MYSELF
