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
Slimshaneey

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

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros