I need to get values from a multiselect
<select id="opcoes" name="opcoes[]" class="select" multiple="multiple" size="5" data-required required="required">
<option value="opcao1">Opção 1</option>
<option value="opcao2">Opção 2</option>
<option value="opcao3">Opção 3</option>
I would like to know how I can get the selected values and put them in a php variable.
I've tried with $_POST['opcoes[]']
, but it always returns null for me.