Aaron1
12-25-2002, 10:55 AM
IS that very hard to do?
I was trying to incorporate that in the follwing script:
$result = mysql_query("SELECT title, threadid, dateline FROM thread WHERE forumid NOT IN ('10','16')ORDER BY dateline DESC LIMIT 40");
while($row = mysql_fetch_assoc($result))
{
echo "<a class=\"cap\" href=\"javascript:;\" onClick=\"opener.location='/forum/showthread.php?s=&threadid=".$row["threadid"]."'\">".$row["title"]."</a>\r\n";
}
I know it has something to do with:
$maxchars=25; //title lenght in characters
if (strlen($thread['title']) > $maxchars) {
$thread['title'] = substr($thread['title'], 0, $maxchars - 2) . '...';
}
But haven't got a clue how to combine that....
Can you help me out?
I was trying to incorporate that in the follwing script:
$result = mysql_query("SELECT title, threadid, dateline FROM thread WHERE forumid NOT IN ('10','16')ORDER BY dateline DESC LIMIT 40");
while($row = mysql_fetch_assoc($result))
{
echo "<a class=\"cap\" href=\"javascript:;\" onClick=\"opener.location='/forum/showthread.php?s=&threadid=".$row["threadid"]."'\">".$row["title"]."</a>\r\n";
}
I know it has something to do with:
$maxchars=25; //title lenght in characters
if (strlen($thread['title']) > $maxchars) {
$thread['title'] = substr($thread['title'], 0, $maxchars - 2) . '...';
}
But haven't got a clue how to combine that....
Can you help me out?