The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Show the first 236 characters....
Well, say I have a variable of text, $text. This variable may have 400 characters or more. What I want to do is cut out the extra characters, leaving it with 236, and if the original variable ($text) is more than 236 characters, it should add "..." after it. Any help would be appreciated. Thanks.
|
#2
|
|||
|
|||
If it's just a variable:
PHP Code:
[sql] IF(LENGTH(field) > 236, CONCAT(SUBSTRING(text, 0, 236), "..."), field) [/sql] |
#3
|
||||
|
||||
Thank you, filburt. That's just what I needed.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|