php - Sentry 2 permissions array -


i have admin panel enables admins assign different permissions user. way through tick boxes , when ticked should assign 1 permission.

the problem is, permissions dynamic , needs go through loop. i've had trouble trying grasp how got assigning permissions way in guess needs loop through array , place values array.

does know how go this?

i have tried things like...

$park = input::get('parks'); $permissions = array();  for($i = 0; $i < count($park); $i++) {     $permissions = $park[$i] => 1; } 

or...

$park = input::get('parks');  for($i = 0; $i < count($park); $i++) {     $park[$i] => 1; } 

obviously first 1 comes errors, second 1 come out [1,1,1,1] .

any appreciated.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -