yii2 - How to write multiple arrays into one variable? -
i need write multiple arrays 1 variable, f.e:
$test= yii::$app->request->get('test', []); $test1 = yii::$app->request->get('test1', []); $test2 = yii::$app->request->get('test2', []);
if have these 3 statements, want join in using 1 variable. possible so?
thanks help
use:
$test = yii::$app->request->get();
you array
data.
or if want specify indexes:
$test[] = yii::$app->request->get('test', []); $test[] = yii::$app->request->get('test1', []); $test[] = yii::$app->request->get('test2', []);
Comments
Post a Comment