Ok, I was helped with using/displaying the following array:
Posted Yesterday, 10:06 AM
Ok, new to PHP ... trying to figure out how to use a multidimensional array,the one shown below. The print_r works fine. But how do I use the array to show the values in another page, e.g. on the new page I want to display the "4" from the "Par" array and the "410" from the "BackYardage" array. Probably very simple but can't figure it out. Thanks. The solution was given to me ... and it works fine ... BUT...
$teeboxes = array
(
"Par" => array
("4","5","3","4","3","4","4","5","4","4","5","3","4","3","4","4","5","4"),
"BackYardage" => array
("410","525","173","394","133","410","425","590","410","410","525","173","394","133","410","425","590","410"),
"MiddleYardage" => array
("410","525","173","394","133","410","425","590","410","410","525","173","394","133","410","425","590","410"),
"FrontYardage" => array
("410","525","173","394","133","410","425","590","410","410","525","173","394","133","410","425","590","410"),
"ForwardYardage" => array
("410","525","173","394","133","410","425","590","410","410","525","173","394","133","410","425","590","410"),
"SeniorYardage" => array
("410","525","173","394","133","410","425","590","410","410","525","173","394","133","410","425","590","410"),
);
Now what I really need next is a solution to the following situation - the above is for one "team, i,e. one course .. but the team could have up to 12 other courses that similar data would be needed ... and there are 5 other teams ... my program has each team sign in so I know what team it is and Would like to be able to display the course data, pars and tee boxes, for each of the course they will be working with. Seems like somehow, reading in each teams course data (pars and yardage) when they sign in would be the way to go ... this is easy using Visual Basic but can't figure out how to do it in PHP ... is there a way to read in the multiple yardages for a signed in team?