Al Capone
02-16-2006, 06:53 PM
hello and good morning :)
Ok, each game listed in my arcade displays a description, which i put in red on the code below, I want it so that only the first 20 charectors of the description is displayed then theres a "..." after it, i know this is probably an easy problem and i looked most everywhere but i couldnt find a solution.
<TR>
<TD>
<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="categHead">
<tr><td> Action / Adventure </td> </tr></table></td></tr><tr><td>
<TABLE cellSpacing=6 cellPadding=0 width="100%"
border=0>
<div align="center">
<table width="500" border="0">
<tr>
<td><div align="center">
<table width="500" border="0">
<tr>
<td width="494" height="0" valign="top">
<center>
<p><font size="1">
<?
$sql2 = "SELECT * FROM games WHERE category='Action / Adventure' ORDER BY played DESC LIMIT 0,3";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<table width="400" border="0">
<tr><td>
<td width="50%" valign="top"><table width="494" border="0" cellpadding="0" cellspacing="3" class="game">
<td width="100"><img src="images/<? echo $row2["image"]; ?>" height="60" width="60"></td>
<td valign="top" width="234" class="normalText">
<div style='text-align:right; overflow:hidden; height:14px;'><a href="game.php?gameid=<? echo $row2["gameid"]; ?>"><FONT color=#000000><? echo $row2["category"]; ?> Games!</a></font></div>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>"><b><? echo $row2["name"]; ?></b></a><br>
<? echo $row2["desc"]; ?><br>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>"><b>Play now!</b></a></font></td></table>
</a>
<tr></td>
any help is greatly appriciated, thanks in advance
Ok, each game listed in my arcade displays a description, which i put in red on the code below, I want it so that only the first 20 charectors of the description is displayed then theres a "..." after it, i know this is probably an easy problem and i looked most everywhere but i couldnt find a solution.
<TR>
<TD>
<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="categHead">
<tr><td> Action / Adventure </td> </tr></table></td></tr><tr><td>
<TABLE cellSpacing=6 cellPadding=0 width="100%"
border=0>
<div align="center">
<table width="500" border="0">
<tr>
<td><div align="center">
<table width="500" border="0">
<tr>
<td width="494" height="0" valign="top">
<center>
<p><font size="1">
<?
$sql2 = "SELECT * FROM games WHERE category='Action / Adventure' ORDER BY played DESC LIMIT 0,3";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<table width="400" border="0">
<tr><td>
<td width="50%" valign="top"><table width="494" border="0" cellpadding="0" cellspacing="3" class="game">
<td width="100"><img src="images/<? echo $row2["image"]; ?>" height="60" width="60"></td>
<td valign="top" width="234" class="normalText">
<div style='text-align:right; overflow:hidden; height:14px;'><a href="game.php?gameid=<? echo $row2["gameid"]; ?>"><FONT color=#000000><? echo $row2["category"]; ?> Games!</a></font></div>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>"><b><? echo $row2["name"]; ?></b></a><br>
<? echo $row2["desc"]; ?><br>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>"><b>Play now!</b></a></font></td></table>
</a>
<tr></td>
any help is greatly appriciated, thanks in advance