4

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?

1 Answer 1

7

How about this:

$arr = $request->getParameter('my_checkbox');
Sign up to request clarification or add additional context in comments.

1 Comment

yeah this should return an array of values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.