0

sorry a basic question and I have resorted to asking as I can't find (or I've just got so frustrated with it) the solution.

I wish to reference a specific key and value within a multidimensional array. My sample array is as below.

So for key 1 and wish to reference the value contained within unique_inter (3)

Any anyone advise the function or method to do this?

Thanks

Array
(
    [1] => Array
        (
            [unique_inter] => 3
            [user_id] => 1
        )

    [4] => Array
        (
            [unique_inter] => 1
            [user_id] => 4
        )

)

1 Answer 1

8
$your_array[1]['unique_inter']
Sign up to request clarification or add additional context in comments.

2 Comments

I knew it would be stupidly simple. I'd tried a number of combinations. Thank you
But how to do it if the string of the parameter is unknown?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.