I have a PHP script displaying items like so:
• Item 1
• Item 2
• Item 3
I'm wanting to have the items displayed like:
• Item 1, • Item 2, • Item 3
The last half of the code (from phpbb) is:
$sql = "SELECT DISTINCT ptxt.post_subject, topic.topic_title, ptxt.post_id, post.post_time
FROM " . POSTS_TEXT_TABLE . " AS ptxt, " . POSTS_TABLE . " AS post, " . TOPICS_TABLE . " AS topic
WHERE topic.forum_id != 2 AND post.post_id = ptxt.post_id AND post.topic_id = topic.topic_id AND post.post_id = topic.topic_last_post_id
ORDER BY post.post_time DESC LIMIT $PostNumber";
///////////////////////////////////////////////////////////
// SETTING/VARIABLES/STUFF
///////////////////////////////////////////////////////////
//
if($r = mysql_query($sql, $db)) {
echo '<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" ALIGN="'.$TableAlign.'" WIDTH="'.$TableWidth.'">';
while($m = mysql_fetch_array($r)) {
$temp = $m[3];
if ($timediff) {
$diffsecs = $timediff * 3600;
$temp += $diffsecs;
}
$pd = getdate ($temp);
if ($m[1]) {
$j = stripslashes($m[1]);
} else {
$j = stripslashes($m[0]);
}
$k = substr($j, 0, 30) . " ...";
if ($pd['minutes'] < 10) {
$pmins = "0".$pd['minutes'];
} else {
$pmins = $pd['minutes'];
}
if ($pd['hours'] < 10) {
$phours = "0".$pd['hours'];
} else {
$phours = $pd['hours'];
}
echo '<TR><TD align="left"><FONT FACE="arial,helvetica" size=2>• <a href="'.$URLPath.'/viewtopic.php?p='.$m[2].'#'.$m[2].'">'.$k.'</a> </TD></TR>';
}
echo "</TABLE>";
}
Any help is greatly appreciated.
-TGH