[LA.pm] how do I trim a $var down
David Heayn
david at cloudgraphics.com
Fri Jun 24 22:32:33 PDT 2005
At 10:16 PM -0700 6/24/05, Kevin Scaldeferri wrote:
>On Jun 24, 2005, at 10:13 PM, David Heayn wrote:
>
>>I want to spit out summaries of a CSV file to HTML, where $content
>>sometimes runs 3000+ characters long. However, I need a way to strip
>>off the bulk of $content, but keep the first 100
>>characters/whitespaces.
>>
>>Ideas?
>>
>
>substr?
>
>-kevin
Thank you Kevin.
I came up with this line out of the camel book...
substr($content, 101) = "";
but I get an error:
substr outside of string at cgi-bin/blog.cgi line 38.
I'm missing something.
David Heayn * http://www.cloudgraphics.com * 213/925.3283
More information about the Losangeles-pm
mailing list