我有多项选择,其中我需要按选择顺序保存它。问题是,订单已排序。
//This is my multiple select...
<select multiple="multiple" name="sequence[]">
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
//This is my code in saving it to the database...
foreach($request->sequence_array AS $key=>$value){
$sequence = new Sequence();
$sequence->sequence = $value;
$sequence->save();
}
当我选择C,A,B
时,我需要它按该顺序保存,但我得到的却是A,B,C
。