You have to use a FOR or WHILE loop. PHP 3 doesn't supported the foreach loop.
You can get identical results by using the examples here: http://www.php.net/manual/en/control-structures.foreach.php "Dean Ouellette" <[EMAIL PROTECTED]> wrote in message 000b01c230f5$7837aa70$9c89adac@yoda">news:000b01c230f5$7837aa70$9c89adac@yoda... > I have a different host I use for my sites, this is one I took over, and > they insist I use this hosting company, friend of an owner. Have been > trying to get to switch but wont. So any ideas on how can get this to > work, no text coming in email > > When I print_r($_POST) ((((what does that do?))) > I get print_r shows everything in the array on the screen. > print_r($_POST) > Fatal error: Call to unsupported or undefined function foreach() in > /www/docs/www.electjoemarine.com/email.php on line 71 > > > PHP Version 3.0.16 > > > <? > > > $MailToAddress = "[EMAIL PROTECTED]"; > > > $MailSubject = "Group volunteer list"; > > > if (!$MailFromAddress) { > > > $MailFromAddress = "$email"; > > > } > > > $Header = ""; > > > $Footer = ""; > > > > > > foreach($_POST as $key => $val) > > > { > > > $val = stripslashes($val); > > > $Message .= "$key = $val\n"; > > > } > > > > What do you see when you: print_r($_POST) I believe it says "Array ( $whatevertheKEYis => $theVALUE, $nextKEY => $nextValue)" on screen for it. Basically, it makes it so you could copy and paste it and create a replica of THAT array. Mostly used for debugging. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php