Posts: 1,832
Location: Somewhere else entirely
|
What form are your links stored in? Are they in one long string variable like:
$link = '<a href="yoururl">Your Link Text</a>';
or are they in separate variables as in
$linkurl = 'yoururl';
$linktext = 'Your Link Text';
?
If they are separate you can just use the substr function:
PHP Code:
$linkhtml = "<a href=\"$linkurl\">".substr($linktext,0,15) ."...</a>";
If not you need to separate out the link text from the rest of the URL which will probably require a regular expression. Post back here if you need a hand with that. 
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';
Scribble Pad MOD for phpBB (aka MSN handwriting for forums)
|