Jump to content

Array results in email message


bschultz

Recommended Posts

I'm trying to print the results of an array inside an email message.

 

It's working...accept that it prints the word Array before the values of the array.

 

<?php
$sql8 = "SELECT first_name, last_name, ump_id FROM ump_names WHERE `ump_id` IN (SELECT ump_id FROM scheduled_umps WHERE `game_id` = '$_SESSION[game_id_number]')"; 
//echo "$sql8<br />";
$rs8 = mysql_query($sql8,$dbc);  
$umps[] = array();
//while($row8 = mysql_fetch_array($rs8)) 
//{
//$umps[] = "$row8[first_name] $row8[last_name]."; 
//}
while($row8 = mysql_fetch_array($rs8)){
$umps[] = "$row8[first_name]" . " " . "$row8[last_name]";
}

$valuesgdf = implode(', ', $umps);




//  this sets the headers and other info for the email
$headers = "From: $_SESSION[association_name]  \n";
$headers .= "Reply-To: $_SESSION[association_name]  \n";
$subject = "There has been a change in your $_SESSION[association_name] Schedule";
$message = "Here is the info for this date: \n\n
Date  - $day \n
Game - $visitor at $home \n
Start Time - $start \n
GAME NOTES - $notes  \n
SCHEDULED OFFICIALS - $valuesgdf";     //this sends"SCHEDULED OFFICIALS - Array name1, name2, name3 etc" in the email...
?>

 

 

How do I get "Array" to not show up prior to $valuesgdf?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/241621-array-results-in-email-message/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.