results of array in body of email getting truncated

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jesso3
Forum Newbie
Posts: 4
Joined: Thu Mar 20, 2003 6:16 pm
Contact:

results of array in body of email getting truncated

Post 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";
}
}
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post 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.
jesso3
Forum Newbie
Posts: 4
Joined: Thu Mar 20, 2003 6:16 pm
Contact:

Post by jesso3 »

Can u tell me what will work? Thanks :)
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post 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
jesso3
Forum Newbie
Posts: 4
Joined: Thu Mar 20, 2003 6:16 pm
Contact:

Post by jesso3 »

email is sent. thanks
Post Reply