Kashif Ali

Kashif Ali

  • NA
  • 78
  • 9.4k

how to pass multiple values to an array PHP

Jan 15 2019 6:11 AM
<select id="framework" name="framework" placeholder="Users" multiple class="form-control" style="width:width: 400px; overflow-y: all; max-height: 200px;">
<option value="[email protected]"> one</option>
<option value="[email protected]"> two</option>
</select>
<?php
$students = $_POST["framework"];
 
/*keep in mind $students takes multiple values like one,two */
 
Now i want to show these value in
 
$emails = array(',' , $students);
 
Is it correct?
 
For example
 
$students have these values: one, two, three, four
 
It should be go in array like
 
$emails = array(',' , 'one', 'two', 'three', 'four') ;
 
Please guide me, how i can do this please!

Answers (4)