-1

I am curious as to what the args['fields'][$k]['order'] means. I am new to PHP and so far I know that args['fields'] would mean that the user is talking about the value for the key 'fields' in the array args. But what does it mean to have 3 brackets (all containing something) after the args part?

foreach($this->args['fields'] as $k => $field){
            if(!isset($field['order']))
                $this->args['fields'][$k]['order'] = 10;
ggkid2002
  • 53
  • 1
  • 8
  • 6
    Your array has 3 dimensions! – Rizier123 Sep 25 '15 at 22:05
  • Ahh...so it's basically saying that in the `args` array, look for the `'fields'` array, and within that look for the `'order'` field and put the value of 10? – ggkid2002 Sep 25 '15 at 22:09
  • Do: `echo "
    "; print_r($this->args);` this will show it pretty good :)
    – Rizier123 Sep 25 '15 at 22:10
  • I'm curious as to why my question got a downvote now...would anyone like to explain what I could do to format this into a better question? I thought the premise was fundamentally valid.... – ggkid2002 Sep 25 '15 at 22:11
  • 2
    I haven't downvoted you but I suspect the feeling is that you could have found the answer in any PHP tutorial covering arrays. See http://stackoverflow.com/help/how-to-ask – Matthew Strawbridge Sep 25 '15 at 22:35

1 Answers1

0

This means that args is a three dimensional array. The key 'fields' in args points to an array. The key $k in that array points to another array. The key 'order' in that array is being assigned with the value 10.

Mureinik
  • 297,002
  • 52
  • 306
  • 350