1

How would I be able to get OUTPUT from this array, I have searched for ages and I cant find anything. I thought it might be '$array->ext->test1' but that didn't work.

Array ( [0] => Array ( [ext] => test1 [type] => test2 [url] => OUTPUT ) )
0

3 Answers 3

2
echo $arr[0]['url'];

Simply as that. :-)

Sign up to request clarification or add additional context in comments.

Comments

1

I suggest you try and go read some manuals (http://php.net/manual/en/function.array.php)

$array[0]['url']

Comments

0

This is the way to get the values:

echo $arr[0]['ext'];
echo $arr[0]['type'];
echo $arr[0]['url'];

Comments

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.