how to yii getPost for array _POST vars?

前端 未结 5 1796
名媛妹妹
名媛妹妹 2020-12-18 20:11

Assuming i have

$_POST[\"x\"][\"y\"] = 5;

how can i

Yii::app()->request->getPost(\'x[y]\');

how ca

5条回答
  •  北海茫月
    2020-12-18 20:59

    With model Test it's look like this

    $test = new Test();
    $test->attributes = Yii::app()->request->getPost('x');   
    $y = $test->getAttribute('y');
    

提交回复
热议问题