+ 1

array

how to put array to Variable۟

7th Mar 2017, 6:33 PM
asghar zinolabedini
asghar zinolabedini - avatar
2 Answers
+ 2
$arr =array[2,3,4,5];
7th Mar 2017, 7:30 PM
Shabi Levi
Shabi Levi - avatar
+ 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';)
8th Mar 2017, 12:50 AM
Kyran Gostelow