I have a form that has a number of checkboxes. When it is submitted I get somethign like this:
[allProj] => allProj
[ccGroup] => Array ( [001] => allCC [92] => 92 [264] => 264 [320] => 320 [331] => 331 [332] => 332)
[crGroup] => Array ( [001] => allCR [16] => 16 [40] => 40 [61] => 61 [60] => 60 [31] => 31 [18] => 18 [39] => 39 [62] => 62 )
I need to sort through this and store appropriate result in my db.
If I have
[allProj] => allProj
then all i need to store is allProj.
If I do not have allProj value submitted then I need to check further. If I have [001] => allCC then I need to store just allCC. The same for crGroup. However if I do not have, say allCR, but have something like this:
[crGroup] => Array ( [16] => 16 [40] => 40 [61] => 61 [60] => 60 [31] => 31 [18] => 18 [39] => 39 [62] => 62 )
I need to implode the values into 16,40,61,60,31,18,39,62
As you can tell, Arrays are not my friends. Need a nudge in the right direction. My guess I need some if/else logic to sort this stuff...