double values in array

From: Date: Wed, 12 Sep 2001 21:58:58 +0000
Subject: double values in array
Groups: php.general 
Request: Send a blank email to php-general+get-67088@lists.php.net to get a copy of this message
I have a form that I would like to send an email once it's validated. I'm using the following code that builds the body of the email. $y = mysql_fetch_array ($getrec_result); while (list($key,$value) = each($y)) { $body .= "$key: $value\n"; } My body looks like this 0: 3 id: 3 1: 2001-09-12 date_add: 2001-09-12 2: Computer Science dept: Computer Science When I really want id: 3 date_add: 2001-09-12 dept: Computer Science What am I doing wrong? Thanks, Tom

« previous php.general (#67088) next »