Jump to content

somone explain this code?


Monkuar

Recommended Posts

if ($r['parent_id'] > 0)
            {
                $this->children[ $r['parent_id'] ][$r['id']] = $r;
            }
            else
            {
                $this->forums[ $r['id'] ] = $r;
            }

 

what is this code doing?

 

i don't get it how it uses the 2 variables in the " [ "  " ] " 's ? weird?

 

$r is a simple select * from a query..

 

i dont get the 2 variables with [] right next to each other?

Link to comment
https://forums.phpfreaks.com/topic/254849-somone-explain-this-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.