Re: [PHP] Checking Checkboxes using Arrays

2001-12-06 Thread jimtronic
When you perform the test you want to know if the $id is the user's choice and if the user's choice is in the array. Your code reads differently. You are checking to see if $id is the user's choice OR $id is in the array. which would always check the countries in the array. >

Re: [PHP] Checking Checkboxes using Arrays

2001-12-06 Thread jimtronic
I'm sorry, your message doesn't make sense... First you say that you want to do what the script is doing, and then you say you don't want it to do that. >i want to select the >countries (check their checkboxes) if they are equal to a particular country >variable I have set or if they appear in

[PHP] Checking Checkboxes using Arrays

2001-12-06 Thread Jordan Elver
Hi, This is doing my head in. I'm printing out a lot of countires from a db and i want to select the countries (check their checkboxes) if they are equal to a particular country variable I have set or if they appear in an array. My code is: $european_union = array('24', '17', '1