I am having a hard time trying to figure this out....
I have a list of arrays in this format:
Code: Select all
$line[0] = array(1, 2, 3, 4, 5);
$line[1] = array(6, 7, 9, 2, ;
$line[2] = array(2, 8, 9, 3, 13);Code: Select all
$start = 1;
$finish = 13;
// routes -------I need help generating this!
$route[0] = array(1, 2, 8, 9, 13);
$route[1] = array(1, 2, 3, 13);
$route[2] = array(1, 2, 8, 9, 3, 13);I need this pretty dynamic, having the ability to scale to alot of different routes, then I would return the one w/ the smallest number of stations (the numbers)
I just cant seem to figure out how to get code this to run through the array and generate thr routes.
Can anyone help me?