How can i make it so that this function:
function news_index($what,$called) {
$query = "SELECT * FROM news";
$result = mysql_query($query);
$int = mysql_num_rows($result);
if($called == "1"){$num = ($int-1);}
if($called == "2"){$num=($int-2);}
$newsdate = mysql_result($result,$num,"date");
$newstitle = mysql_result($result,$num,"title");
$newsdesc = mysql_result($result,$num,"description");
IF ($what == "1"){print "$newstitle";}
IF ($what == "2"){print "$newsdesc";}
IF ($what == "3"){print "$newsdate";}
}
when say called as
new_index(2,1);
If the total number of characters is over say 40 it will only print 40 chars rather than all of the entry
TIA
RT