I've seen a few example here on stack but they don't seem to cover this scenario.
I'm attempting this;
$flight_range = array(
array('range' => range(1,50), 'service' => 'Long Haul'),
array('range' => range(51,54), 'service' => 'Short Haul'),
....
);
but PHP won't let me. It returns;
Parse error: syntax error, unexpected '(', expecting ')' on line 02
This does not work either;
array(range(1,50), range(51,54) ...
The problem is with trying to assign a value of range().
I have 20+ sets of range values to assign.
Can anyone suggest an easy method for achieving these sorts of array values?
EDIT; haike00, Jack and Sean are right.
Maybe my question should be how do i make $flight_range a member variable of a class;
private $flight_range = array(array('range' => range(1,50), 'service' => 'Long Haul'));
....does not help much.