Pessoal eu tenho um script de noticias, e queria que quando aparecerem a noticias no index limitasse o numero de caracteres para que as pessoas clicassem no ler mais e iria para a pagina de noticia. Esse eo script que faz aparecer a noticia no index agora como se faz para limitar o numero de caracteres. <table maxlenght width="100%" height="25%" <?php
include("connection.php");
$result = mysql_query("SELECT * FROM vars");
while($row = mysql_fetch_array($result))
{
$twidth=$row['TWidth'];
$tbg=$row['TBg'];
$bgi=$row['BGI'];
$tbord=$row['TBord'];
$tbw=$row['TBW'];
$nbord=$row['NBord'];
$spacing=$row['Spacing'];
$dfont=$row['DFont'];
$dfsize=$row['DFSize'];
$dfc=$row['DFC'];
$dalign=$row['DAlign'];
$nalign=$row['NAlign'];
$tbc=$row['TBC'];
$pbc=$row['PBC'];
}
switch($dfont)
{
case "1":
$font="font: Arial, Helvetica, sans-serif;";
break;
case "2":
$font="font: Georgia, \"Times New Roman\", Times, serif;";
break;
case "3":
$font="font: Geneva, Arial, Helvetica, sans-serif;";
break;
case "4":
$font="font: \"Courier New\", Courier, monospace;";
break;
case "5":
$font="font: \"Times New Roman\", Times, serif;";
break;
case "6":
$font="font: Verdana, Arial, Helvetica, sans-serif;";
break;
}
echo "<table width=\"".$twidth."\" style=\"background: ".$tbg;
if($bgi!="NULL")
{echo " url('".$bgi."')";}
echo " repeat scroll; border: ".$tbc." ".$tbord." ".$tbw.";\">";
$result = mysql_query("SELECT * FROM news ORDER BY Number LIMIT 0,1");
while($row = mysql_fetch_array($result))
{
echo "<tr><td>";
echo "<table width=\"100%\" style=\"margin-bottom: ".$spacing.";\">";
echo "<tr>
<td align=\"".$dalign."\" colspan=\"2\"><font color=\"".$dfc."\"><span style=\"font: ".$font.";font-size: ".$dfsize."\">".$row['Date']."</span></font></td>
</tr>";
echo "<tr >
<td width=\"10x\"> </td><td align=\"".$nalign."\" style=\"border-bottom: ".$pbc." ".$nbord." 1px;\">".$row['News']."</td>
</tr>";
echo "</table>
</td></tr>";
}
echo "</table>";
mysql_close($con);
?>
</table> desde já obrigado.