I know it can be done like this
test['array'][0] = 'A';
test['array'][1] = 'B';
test['array'][2] = 'C';
test['array'][3] = 'D';
is there more simplier or better way to store variables in array than the example above? ^_^
I know it can be done like this
test['array'][0] = 'A';
test['array'][1] = 'B';
test['array'][2] = 'C';
test['array'][3] = 'D';
is there more simplier or better way to store variables in array than the example above? ^_^
The default way (works in all PHP versions)
$test['array'] = array('A','B','C','D');
In PHP 5.4 and later you can use JS style array declarations
$test['array'] = ['A','B','C','D'];