I would like to update my database content and I first need to check the last saved value to my user and allow him to update his data !!!
here is my code but it doesn't work !!!
$form->dropDownList($persons,'sex', array(''=>"Choose" ,'M'=>'Man', 'F'=>'Woman'), array('options' => array($person_data['sex'] => array('selected'=>true))));
print_r($person_data['sex']) is showing me the right value from DB ('M' or 'F').
can any one show me how to do this please. i already check here but most of solution propose just show with a particular index but it's not working for me.
Bellow code will help you