Forum Moderators: coopster

Message Too Old, No Replies

Split Dynamic Content PHP or Javascript

         

gdog

2:31 pm on May 17, 2004 (gmt 0)

10+ Year Member



Hello,

I have been working on a new site for ages trying to come up with a good way to cleanly split up content using PHP or Javascript.

Basically what I want to do is split dynamic content that includes links in to certain length chunks and not just cut off the string in the middle of a link. The length will be determined by the current users font-size.

Is there a PHP function that does this by any chance or do you know of one, javascript also.

Thanks

Graham

jatar_k

5:25 pm on May 17, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld gdog,

Have you taken a look through
PHP String Functions [ca.php.net]

You can find all sorts of srtring chopping and manipulation functions in there. The may page gives a little summary beside each function. I often read through them when I am looking for a function and see if anything fits. I then read the user comments and follow the links to other functions and I always find what I want.