Trying to fill in a gap in my understanding of php, and so this is rather
newbish:
I have created a form where a user selects 2 items from a list of 8 values.
That form field is called "choices" and returns a value to the php file as
$choices. This form posed no problem when I only allowed a single item to be
selected, but the client now needs to have 2 items selected at a time.
The problem I'm having is that I don't know how to turn the multiple
selections on the form in to an array. I thought the $choices variable
would automatically become an array, but
Using
for ( $i = 0; $i<2; $i++ )
echo "$choices[$i] "; only returns the first two letters of the last selected item value.
And
foreach($choices as $articles)
echo $articles. ' ' ;
Returns an invalid argument.
While echo $choices returns the second item selected in the list, but not
the first.
It appears that the variable is replacing the first item selected with the
second rather than returning an array.
Any help appreciated.
Thanks
Jeff
~~~~~~~~~~~~
Jefferis Peterson, Pres.
Web Design and Marketing
http://www.PetersonSales.com
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----