Im stuck on an issue I just cant solve. Ive thought about how, looked it up, and have not yielded any results.
Im trying to use an array in an email, and I need a double line break between them.
Im creating two arrays from within a mysql query results loop like so:
while($row = $result->fetch_assoc()){
$updated_email_array['Clinic']=$row['clinic_name'];
$updated_email_array['Email_Credits_To_Add']=$row['email_allotment'];
$updated_email_array['SMS_Credits_To_Add']=$row['sms_allotment'];
$updated_email_array['Email_Credits_Rolling_Over']=$row['$email_left'];
$display_email_array[] = $updated_email_array;
}
Im then parsing out the values and adding them to a variable to be nested in an email, like so:
$intouch_credit_refill_message = "Credit Refill Report\n\n";
foreach ($display_email_array as $each_member) {
while (list($key, $value) = each ($each_member)) {
$intouch_credit_refill_message .= "$key: $value\n";
}
}
Lastly, im sending $intouch_credit_refill_message in an email
mail($email address,"Credit Refill Record",$intouch_credit_refill_message,"From: [email protected]");
This gives me:
Credit Refill Report
Clinic: Royal York Animal Hospital
Email_Credits_To_Add: 5000
SMS_Credits_To_Add: 500
Email_Credits_Rolling_Over: 100200
Smail_Credits_Rolling_Over: 10050
New_Email_Credit_Allotment: 105200
New_SMS_Credit_Allotment: 10550
Clinic: Jason's Test Clinic
Email_Credits_To_Add: 5000
SMS_Credits_To_Add: 500
Email_Credits_Rolling_Over: 75000
Smail_Credits_Rolling_Over: 7500
New_Email_Credit_Allotment: 80000
New_SMS_Credit_Allotment: 8000
But I Need:
Credit Refill Report
Clinic: Royal York Animal Hospital
Email_Credits_To_Add: 5000
SMS_Credits_To_Add: 500
Email_Credits_Rolling_Over: 100200
Smail_Credits_Rolling_Over: 10050
New_Email_Credit_Allotment: 105200
New_SMS_Credit_Allotment: 10550
Clinic: Jason's Test Clinic
Email_Credits_To_Add: 5000
SMS_Credits_To_Add: 500
Email_Credits_Rolling_Over: 75000
Smail_Credits_Rolling_Over: 7500
New_Email_Credit_Allotment: 80000
New_SMS_Credit_Allotment: 8000
I cant figure out how to add a break like that between the arrays in the loop where they are added to the email line.
Thank you for any help you might give.