Page 1 of 1

results of array in body of email getting truncated

Posted: Mon Mar 24, 2003 1:36 pm
by jesso3
Hi. I have this problem. I have multiple arrays. I add them to a variable, and add that variable to my email function to be sent, but the results keep getting truncated. Any ideas why? Any advice or a better way of going about it would be appreciated.
Question 1 - Incorrect. Actu"
You see, it always stops at the u of Actu.

else {
for($j=0;$j<count($sizeof8);$j++) { // $sizeof8 is the array
$outputt10 = $sizeof8[$j]; // add it to a variable
$anss = "$speechst Question $realyy - Incorrect. Actual Answer was :$outputt10"; // add it to the variable $anss to be added to body of message

$sizeof6 = array_merge($sizeof,$sizeof2); // combine two arrays to be used for message body
for($j=0;$j<count($sizeof6);$j++) {
//for($j=0;$j<count($sizeof8);$j++) {
$me2 .= $anss[$j];
$body = "$email, $name, $Company, $City, $phone_no, $currentgrade, $currentScore, $me2";
}
}

Posted: Mon Mar 24, 2003 5:39 pm
by Gen-ik

Code: Select all

$anss = "$speechst Question $realyy - Incorrect. Actual Answer was :$outputt10"; // add it to the variable
When you create your $anss variable (above) you aren't creating an array, you're creating a standard variable...

...so this...

Code: Select all

$me2 .= $anss[$j];
...isn't going to work.

Posted: Mon Mar 24, 2003 5:53 pm
by jesso3
Can u tell me what will work? Thanks :)

Posted: Mon Mar 24, 2003 6:16 pm
by Gen-ik
Email me over the code you are using with a quick note on what you are trying to do and I will sort it out for you in the next hour or so. 8)

si@urbanchaos.net

Posted: Mon Mar 24, 2003 6:23 pm
by jesso3
email is sent. thanks