![]() |
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.
|
If it's just a variable:
PHP Code:
[sql] IF(LENGTH(field) > 236, CONCAT(SUBSTRING(text, 0, 236), "..."), field) [/sql] |
Thank you, filburt. That's just what I needed. :)
|
All times are GMT. The time now is 11:16 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|