Jump to content

Recommended Posts

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?

 

Link to comment
https://forums.phpfreaks.com/topic/284027-using-multiple-arrays-or-read-in-data/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.