Andy Hassall wrote:
On Sun, 07 Nov 2004 19:39:28 GMT, leegold2 <le*****@nospam.net> wrote:
This has been done before but not sure how:
Say I have a string of 1000 chars. I want to split the string into two
variables (two array element variables would be OK) one has 200 chars
the other has 800 chars. How would I do this? Must be simple in PHP...
substr
Like:
$d_content1 = substr($d_content,0,100);
$d_content2 = substr($d_content,100);
But, I need it to break the string on the nearest word. I jusr realized
that because I got:
$d_content1 == ....this is really gre
$d_content2 == at
I need it to do:
$d_content1 == ....this is really
$d_content2 == great
Thanks,
Lee G.