APD Toronto
asked on
Converting PDO Array into Static
Hi Experts,
I am building a prototype and I am wondering what is the quickest way to hardcode the following array into my code
I am building a prototype and I am wondering what is the quickest way to hardcode the following array into my code
(
[0] => Array
(
[date] => 2013-07-01
[run] => A
[capacity] => 56
[vehicle_id] => 37
[total_trip_pax] => 47
)
[1] => Array
(
[date] => 2013-07-01
[run] => B
[capacity] => 58
[vehicle_id] => 9
[total_trip_pax] => 48
)
[2] => Array
(
[date] => 2013-07-01
[run] => C
[capacity] => 0
[vehicle_id] => 35
[total_trip_pax] => 13
)
[3] => Array
(
[date] => 2013-07-02
[run] => A
[capacity] => 48
[vehicle_id] => 36
[total_trip_pax] => 37
)
[4] => Array
(
[date] => 2013-07-02
[run] => B
[capacity] => 56
[vehicle_id] => 37
[total_trip_pax] => 50
)
[5] => Array
(
[date] => 2013-07-03
[run] => A
[capacity] => 58
[vehicle_id] => 9
[total_trip_pax] => 49
)
[6] => Array
(
[date] => 2013-07-03
[run] => B
[capacity] => 48
[vehicle_id] => 17
[total_trip_pax] => 41
)
[7] => Array
(
[date] => 2013-07-03
[run] => C
[capacity] => 48
[vehicle_id] => 36
[total_trip_pax] => 43
)
[8] => Array
(
[date] => 2013-07-03
[run] => D
[capacity] => 0
[vehicle_id] => 35
[total_trip_pax] => 2
)
[9] => Array
(
[date] => 2013-07-04
[run] => A
[capacity] => 56
[vehicle_id] => 37
[total_trip_pax] => 52
)
[10] => Array
(
[date] => 2013-07-04
[run] => B
[capacity] => 48
[vehicle_id] => 36
[total_trip_pax] => 47
)
[11] => Array
(
[date] => 2013-07-05
[run] => A
[capacity] => 56
[vehicle_id] => 37
[total_trip_pax] => 47
)
[12] => Array
(
[date] => 2013-07-05
[run] => B
[capacity] => 48
[vehicle_id] => 17
[total_trip_pax] => 48
)
[13] => Array
(
[date] => 2013-07-05
[run] => C
[capacity] => 0
[vehicle_id] => 35
[total_trip_pax] => 9
)
[14] => Array
(
[date] => 2013-07-06
[run] => A
[capacity] => 58
[vehicle_id] => 9
[total_trip_pax] => 49
)
[15] => Array
(
[date] => 2013-07-06
[run] => B
[capacity] => 56
[vehicle_id] => 37
[total_trip_pax] => 49
)
[16] => Array
(
[date] => 2013-07-06
[run] => C
[capacity] => 48
[vehicle_id] => 36
[total_trip_pax] => 43
)
[17] => Array
(
[date] => 2013-07-07
[run] => A
[capacity] => 58
[vehicle_id] => 9
[total_trip_pax] => 54
)
[18] => Array
(
[date] => 2013-07-07
[run] => B
[capacity] => 56
[vehicle_id] => 37
[total_trip_pax] => 52
)
[19] => Array
(
[date] => 2013-07-08
[run] => A
[capacity] => 48
[vehicle_id] => 36
[total_trip_pax] => 39
)
[20] => Array
(
[date] => 2013-07-08
[run] => B
[capacity] => 56
[vehicle_id] => 37
[total_trip_pax] => 53
)
Thank you
[21] => Array
(
[date] => 2013-07-08
[run] => C
[capacity] => 58
[vehicle_id] => 9
[total_trip_pax] => 48
)
)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For a prototype I would put this in an include file and then include it in your test - passing $data to the required processing unit as a parameter - that way it stays out of your main code.