RE: [PHP] What's wrong with this code please?

From: Date: Tue, 24 Feb 2004 17:52:54 +0000
Subject: RE: [PHP] What's wrong with this code please?
Groups: php.general 
Request: Send a blank email to php-general+get-178742@lists.php.net to get a copy of this message
If you want to see the contents of an array, use the print_r function: http://www.php.net/print_r HTH! --Sam Donpro wrote: > $emails = > array("email1@domain.com","email2@domain.com",email3@domain.com); > $addresses = explode(",",$emails); > for ($i=0; $i < count($addresses); $i++) { > echo $i . ': ' . $addresses[$i] . '<br>'; > if ($i == count($addresses) - 1) > $form['recipient'] .= $addresses[$i]; > else > $form['recipient'] .= $addresses[$i] . ','; > } > echo 'Recipient = ' . $form['recipient'] . '<br>'; > > > The output I am receiving is: > 0: Array > Recipient = Array > > Obviously, I want to see the output of each array element as well as > the final contents of $form['recipient']. > > Thanks in advance, > Don

« previous php.general (#178742) next »