Hi, this is where the substr() function would come in useful : http://uk.php.net/manual/en/function.substr.php
You can use it to take a string and then only return part of it, like so:
PHP Code:
<?php
$thread = "I am a thread, I am really long and need to be shortened";
// Say you want to only return 50 characters you would do the following
$val = substr($thread, 0, 50) . "...";
// Translated it would be - Start at the beginning of $thread and move along 50 characters, and discard the rest
echo $val;
// This returns : I am a thread, I am really long and need to be sho...
Hope that helps you.
Edit: Welcome to the forums!
Bookmarks