Jolten
09-10-2004, 01:08 AM
Hi,
I've got a query and string to display some information and usernames. One problem I'm having is long usernames. I'd like to truncate usernames longer than 8 characters to 6 characters then add ... after it. I can't seem to get this working in my while loop. Any help would be appreciated.
here's what I've got right now inside the while loop
if (strlen($row2->strUsrid) > 8)
{
$Winner = substr($row2->strusrid, 0, 8 - 2) . '..';
}
I've got a query and string to display some information and usernames. One problem I'm having is long usernames. I'd like to truncate usernames longer than 8 characters to 6 characters then add ... after it. I can't seem to get this working in my while loop. Any help would be appreciated.
here's what I've got right now inside the while loop
if (strlen($row2->strUsrid) > 8)
{
$Winner = substr($row2->strusrid, 0, 8 - 2) . '..';
}