Getting element from PHP array returned by function

后端 未结 7 1096
野趣味
野趣味 2020-12-11 01:10

I\'m not sure if this is possible, but I can\'t figure out how to do it if it is...

I want to get a specific element out of an array that is returned by a function,

7条回答
  •  旧时难觅i
    2020-12-11 01:57

    I am fairly certain that is not possible to do in PHP. You have to assign the returned array to another array before you can access the elements within or use it directly in some other function that will iterate though the returned array (i.e. var_dump(getSomeArray()) ).

提交回复
热议问题