PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Aaron
Forum Commoner
Posts: 82 Joined: Sun May 12, 2002 2:51 pm
Post
by Aaron » Tue Jun 04, 2002 1:13 pm
Code: Select all
<table width="500" border="0" cellspacing="0" cellpadding="0"><tr>
<td bgcolor="#000000"><font color="#FFFFFF"> :: Title // Catogory :: Poster</font></td></tr>
<tr><td bgcolor="#999999">News</td></tr><tr>
<td bgcolor="#999999"><div align="right">no of comments :: Add // View</div></td></tr></table>
Is how the I want the news displayed...but this is how it looks =/
Code: Select all
echo " <h1>news</h1>\n";
$query = mysql_query("SELECT * FROM $table_news WHERE approved = 'Yes' ORDER BY id DESC LIMIT $ppp");
while($result = mysql_fetch_array($query)) {
$resultїbody] = zap($resultїbody]);
$date = date("F d, Y", $resultїtime]);
$time = date("h:i a", $resultїtime]);
$date = strtolower($date);
$time = strtolower($time);
if($resultїnumcom] > 1) {
$word = "comments";
} else {
$word = "comment";
}
if($resultїextended]) {
$size = number_format(strlen($resultїextended]));
$morelink = "<br /><br /><a href='truth.php?id=$resultїid]'>read more ($size bytes)</a>";
} else {
$morelink = "";
}
echo " <p>\n";
echo " <b> :: <a href='users.php?name=$resultїaname]'>$resultїaname]</a> // <a href='truth.php?id=$resultїid]'>$resultїtitle]</a></b><br />\n";
echo " for <a href='topics.php?name=$resultїtopic]'>$resultїtopic]</a> on $date at $time ($resultїnumcom] $word: <a href='truth.php?id=$resultїid]#addcomments'>add</a> // <a href='truth.php?id=$resultїid]#comments'>view</a>)<br /><br /></p>\n";
echo " <blockquote>$resultїbody]\n";
echo " $morelink</blockquote>\n";
echo " <br />\n";
}
Can anyone combine them without causing a parse error =/
jason
Site Admin
Posts: 1767 Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:
Post
by jason » Tue Jun 04, 2002 2:26 pm
What program is this from?
Aaron
Forum Commoner
Posts: 82 Joined: Sun May 12, 2002 2:51 pm
Post
by Aaron » Tue Jun 04, 2002 2:47 pm
nos. not public, brought it.
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Tue Jun 04, 2002 4:47 pm
oh sorry,
just signed a non-disclosure agreement about this problem
Aaron
Forum Commoner
Posts: 82 Joined: Sun May 12, 2002 2:51 pm
Post
by Aaron » Tue Jun 04, 2002 4:56 pm
=(
hex
Forum Commoner
Posts: 92 Joined: Sat Apr 20, 2002 3:20 am
Location: UK
Post
by hex » Thu Jun 06, 2002 7:06 am
Code: Select all
echo " <h1>news</h1>\n";
$query = mysql_query("SELECT * FROM $table_news WHERE approved = 'Yes' ORDER BY id DESC LIMIT $ppp");
while($result = mysql_fetch_array($query)) {
$resultїbody] = zap($resultїbody]);
$date = date("F d, Y", $resultїtime]);
$time = date("h:i a", $resultїtime]);
$date = strtolower($date);
$time = strtolower($time);
if($resultїnumcom] > 1) {
$word = "comments";
} else {
$word = "comment";
}
if($resultїextended]) {
$size = number_format(strlen($resultїextended]));
$morelink = "<br /><br /><a href='truth.php?id=$resultїid]'>read more ($size bytes)</a>";
} else {
$morelink = "";
}
echo "<table width='500' border='0' cellspacing='0' cellpadding='0'><tr>";
echo "<td bgcolor='#000000'><font color='#FFFFFF'> :: ";
echo "<a href='truth.php?id=$resultїid]'>$resultїtitle]</a> // <a href='topics.php?name=$resultїtopic]'>$resultїtopic]</a> :: ";
echo "<a href='users.php?name=$resultїaname]'>$resultїaname]</a></font></td></tr>";
echo "<tr><td bgcolor='#999999'>$resultїbody]\n$morelink\n";
echo "<td bgcolor='#999999'><div align='right'>($resultїnumcom] $word: <a href='truth.php?id=$resultїid]#addcomments'>add</a> // ";
echo "<a href='truth.php?id=$resultїid]#comments'>view</a>)</div></td></tr></table>";
}