retrieve data from dropdownlist

HI, i have my dropdownlist with multiple selection





echo CHtml::dropDownList('mydropdownlist','mydropdownlist', $offre0, array('multiple' => 'multiple'));



and in my controller i retrieve the value of mydropdownlist




if(isset($_GET['mydropdownlist']))

	 {   

	     

		       $model->slct = $_GET['mydropdownlist'];

			  

	 }



but when i show the value of $slct it shows only the index(0,1,2 …) not the value of field!!

how can i retrieve the value selected

and how can i retrieve multiple values selected!!

thak you

regards

You get the index position(s) of the selected element(s)… to get the value use the original array holding all the values… in your case $offre0

yees i’m stupid, thank you

if i want to get directly the value without going through index, how can i retrieve it?