Hi,
I have a news box on the homepage and I want that it displays the 2 last entries and with a maximum off 160ch. and if longer then put 3 points at the and off the 160ch.
ex.: Now updates now available in the downl...
By Using:
$connection=mysql_connect($db_host, $db_user, $db_pass)or die("<font color=\"#ff0000\">ERROR: Server Not Found</font>");
$database=mysql_select_db($db_database,$connection);
echo"<table width=\"250\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">";
$part2=mysql_query("SELECT * FROM $nw WHERE lang='$lang'",$connection);
$i=0;
while($row=mysql_fetch_array($part2))
{
$i++;
if ($i%2) { $bgcolorm=" bgcolor=\"$table_wssn1\""; } else { $bgcolorm=" bgcolor=\"$table_aosw1\""; }
echo"
<tr$bgcolorm>
<td>
<table width=\"250\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td><font face=\"$font_face\" size=\"$font_size\" color=\"$font_color1\"><b>$row[date]</b></font></td>
</tr>
<tr>
<td><font face=\"$font_face\" size=\"$font_size\" color=\"$font_color1\">$row[content]</font></td>
</tr>
</table>
</td>
</tr>
";
}
echo"</table>";