How do I make the final foreach instance end without the , character? As it stands every instance of $var2 is followed by a , character. Code to follow, thanks in advance.
foreach($tags as $var1 => $var2) {
if($_SESSION[$var1]!="off")
{
include($var2);
echo",";
//needs to include no , character on the last instance.
}
else
{
echo $var1;
}
}