accessing array values without square brackets in php
Posted
by amb
on Stack Overflow
See other posts from Stack Overflow
or by amb
Published on 2010-03-23T01:15:30Z
Indexed on
2010/03/23
1:21 UTC
Read the original article
Hit count: 373
In php how can I access an array's values without using square brackets around the key? My particular problem is that I want to access the elements of an array returned by a function. Say function(args) returns an array. Why is $var = function(args)[0]; yelling at me about the square brackets? Can I do something like $var = function(args).value(0); or am I missing something very basic?
© Stack Overflow or respective owner