ajsinclair

msg:1303708 | 3:05 pm on Mar 30, 2004 (gmt 0) |
Never mind - I figure it out: substr($var,0,$limit)
|
coopster

msg:1303709 | 3:06 pm on Mar 30, 2004 (gmt 0) |
You mean something like a substring [php.net]? one minute too slow ;)
|
bonanza

msg:1303710 | 3:47 pm on Mar 30, 2004 (gmt 0) |
Ah, but does anyone have a neat trick to truncate only on a whitespace after a certain number of characters? I'll be working on a brute-force subroutine to do this, but thought I'd ask in case someone's got a fancy regexp trick or something.
|
Birdman

msg:1303711 | 4:38 pm on Mar 30, 2004 (gmt 0) |
$string = "Your feed string here"; $max = 100; substr($string,0,strpos($string," ",$max)); That will truncate on the first whitespace found starting at the 100th position.
|
|