Jump to content

Array Question:


Awptics

Recommended Posts

I'm taking a PhP class and I was given a project to make an array with the statistics for the whole roster of the Chicago Bears.  I am then supposed to add up all the weights and find the average, then convert the heights to numeric inches and and find the average then convert it back into 6'4'' format, then find the average age of the team, so its all pretty much the same thing, I need to find a way to pull the information out of the array and mess with it, this is what i have so far, how do i pull this information out of the array so i can manipulate it.

 

<?php
$characters=array(
array(
              "number"=>95,										 "Fname"=>"Anthony",
 "Lname"=>"Adams",
 "Position"=>"NT",
"Height"=>"6'0''",
"Weight"=>"300",
             "Birthdate"=>"6/18/1980",
 "College"=>"Penn_State",
),
array(
"number"=>97,
"Fname"=>"Mark",
"Lname"=>"Anderson",  
"Position"=>"DE",
 "Height"=>"6'4''",
"Weight"=>"255",
 "Birthdate"=>"5/26/1983",											 "College"=>"Alabama",
),

Link to comment
https://forums.phpfreaks.com/topic/80023-array-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.