$ _ SESSION [expanded] [$ _ GET [expand] true; what do you mean
This is a strange way.
Reply to discussion (solution)
$ _ GET ['expand'] is used to obtain the parameter value passed in get mode.
$ _ SESSION ['extended'] [] is a two-dimensional array.
For example, the value of $ _ GET ['expand'] is abc.
So
$ _ SESSION ['extended'] [$ _ GET ['expand'] = true;
Equal
$ _ SESSION ['extended'] ['ABC'] = true;
Strange?
The last $ _ SESSION value is array ('expanded' => array ('ABC' => true ));
Print_r ($ _ SESSION)
You know what the team lead looks like.
$ A = $ _ GET ['expand']; // retrieve the value in $ _ GET ['expand'] $ B = 'expandded '; // $ B assigned $ _ SESSION [B] [a] = true; // Set the session value
It's nothing more than a long word!
$ A = $ _ GET ['expand']; // retrieve the value in $ _ GET ['expand'] $ B = 'expandded '; // $ B assigned $ _ SESSION [$ B] [$ a] = true; // Set the session value
It's not surprising, it's a two-dimensional array of sessions ..
Array problems
$ _ SESSION ['extended'] = $ abc
$ _ GET ['expand'] = 2
In other words
$ Abc [2] = true
This is a typical array method.