This is my code:
<?=
$rates= ApplicantRating::find()->all();
$listData= \yii\helpers\ArrayHelper::map($rates,'id','name');
echo $form->field($model,'name')->dropDownList($listData,['prompt'=>'Select...']);
?>
I have a:
PHP Notice – yii\base\ErrorException Array to string conversion error
and I cannot understand why. It is highlighting the line $rates= ApplicantRating::find()->all(); as the problem. Any suggestions pls?
Thanks a lot.
<?phptag instead of echo shortcut. - Teemu