OK all you intelligent scripters ... I could use a little assistance if you please.
I would like to take the input from a form (type=TEXTAREA) and chop it into a length to be determined by a variable so that each line is placed into an array.
Example:
if $length=20
$message = "We the people of the United States, in order to form a more perfect Union, establish justice ..."
becomes ...
$msg[0] = "We the people of the"
$msg[1] = "United States, in"
$msg[2] = "order to form a more"
$msg[3] = "perfect Union"
$msg[4] = "establish justice..."
Line breaks would need to be converted to an empty variable, i.e. $msg[5] = ""
Any suggestions?
[This message has been edited by Lee (edited August 13, 1999).]
I would like to take the input from a form (type=TEXTAREA) and chop it into a length to be determined by a variable so that each line is placed into an array.
Example:
if $length=20
$message = "We the people of the United States, in order to form a more perfect Union, establish justice ..."
becomes ...
$msg[0] = "We the people of the"
$msg[1] = "United States, in"
$msg[2] = "order to form a more"
$msg[3] = "perfect Union"
$msg[4] = "establish justice..."
Line breaks would need to be converted to an empty variable, i.e. $msg[5] = ""
Any suggestions?
[This message has been edited by Lee (edited August 13, 1999).]