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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.