Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Get list from multidimensional array

Avatar of atari2600
atari2600Flag for United Kingdom of Great Britain and Northern Ireland asked on
PHP
4 Comments1 Solution330 ViewsLast Modified:
Hi,

I am trying to get my head around listing values from a PHP multidimensional array. I have been using foreach to try and do it, but can't seem to quite get to the array, inside the array. So for example how would I list all the values for 'Term' in the following example:

Array
(
    [ArrayOfRate] => Array
        (
            [Rate] => Array
                (
                    [0] => Array
                        (
                            [Market] => A*
                            [Term] => 24
                            [MinAdvance] => 1000.00000000
                            [MaxAdvance] => 1099.00000000
                            [APR] => 0.1752
                            [LendingRate] => 0.0593
                            [MonthlyRepayment] => 49.08754600
                            [TotalRepayment] => 1178.10110400
                            [TotalCredit] => 1110.00000000
                            [TotalInterest] => 68.10110400
                            [Fee] => 110.00000000
                        )

                    [1] => Array
                        (
                            [Market] => A*
                            [Term] => 36
                            [MinAdvance] => 1000.00000000
                            [MaxAdvance] => 1099.00000000
                            [APR] => 0.1656
                            [LendingRate] => 0.0593
                            [MonthlyRepayment] => 34.87240500
                            [TotalRepayment] => 1255.40658000
                            [TotalCredit] => 1150.00000000
                            [TotalInterest] => 105.40658000
                            [Fee] => 150.00000000
                        )
		)
	)
)

Thanks.

Paul.
ASKER CERTIFIED SOLUTION
Avatar of Slimshaneey
SlimshaneeyFlag of United Kingdom of Great Britain and Northern Ireland image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers