tags:

views:

131

answers:

1

Html:

<input type="checkbox" value="1" name="my_checkbox[]">
<input type="checkbox" value="2" name="my_checkbox[]">
<input type="checkbox" value="3" name="my_checkbox[]">

In action:

$arr= $request->getParameter('my_checkbox[]');

this does not work. Any solution?

+2  A: 

How about this:

$arr = $request->getParameter('my_checkbox');

zergu
yeah this should return an array of values.
prodigitalson
ok it works =), thanks.
Emergento