+ 1
array
how to put array to VariableŰ
2 Answers
+ 2
$arr =array[2,3,4,5];
+ 1
There are a few ways;
You can start an array and place values into it from the beginning ($foo = ('bar' => 'gar');),
You could start an array then reference it ($foo = array; $foo['bar'] = 'gar';)
Or, (not recommended) you could set a value and then add in values ($foo; $foo['bar'] = 'gar';)