Hello.
I'm trying to get the wordwrap() function to work. It's not working properly.
What I'm trying to do is combine five text strings into one variable string and then apply the wordwrap() function to the combined string.
What it's doing is the wordwrap() function does not start working until it gets to the last variable in the combined string.
$One = "City";
$Two = "State";
$Three = "Date";
//four equals the string " /text/ "
$Five = "We are constantly looking for new ways to recognize these young men for their contributions to our program. This is one way we acknowledge all they have done, and continue to do, for the program";
$String = wordwrap($One.", ".$Two." ".$Three." /text/ -- ".$Five, 68);
//The $String above outputs this on the page:
City, State Date /text/ We are constantly looking
for new ways to // it cuts off here
recognize these young men for their contributions to our program.
This is one way we acknowledge all they have done, and continue
to do, for the program
//The wordwrap starts working at the "We are ..." and then ends the wordwrap at the "to".
// The "We are constantly looking for new ways to" equals the first 68 (or whatever) characters.
// It starts wrapping after the "to" It should include more on the 2nd line.
//-------
Can anybody spot the problem?
Thanks.