I have a script which retrieves info from a mysql database, then displays this in a table.
The problem that i have is that one of the fields is very long, (some entries have a length of 80-90 characters).
What i would like to do is to strip this down so it only displays the first say 40 characters of the string.
I suppose i could do a
for($i=0;$i <40; $i++)
{
print $string[$i];
}
but considering there are 300+ records i don't want to do this if at all possible.
Any suggestions??
cheers
Jamie