$_session[' expanded '][$_get[' expand ']] = true; What do you mean, a workaround?

Source: Internet
Author: User
$_session[' expanded '][$_get[' expand ']] = true; What do you mean?
$_session[' expanded '][$_get[' expand ']] = true; What do you mean?
This is a strange spelling.
------Solution--------------------
$_get[' Expand ' is a parameter value that gets passed in a get way.
$_session[' expanded ' [] is a two-dimensional array.

For example, the value of $_get[' expand ') is ABC
So
$_session[' expanded '][$_get[' expand ']] = true;
Equals
$_session[' expanded ' [ ' abc '] = true;

Is it weird?
The last $_session value is an array (' expanded ' =>array (' abc ' =>true));
------Solution--------------------
Print_r ($_session)
I know what a number leader looks like.
------Solution--------------------

$a = $_get[' expand '); Remove the value from $_get[' expand ']
$b = ' expanded '; $b Assignment
$_session[b][a] = true; Set Session value


It's just a long word!
------Solution--------------------

$a = $_get[' expand '); Remove the value from $_get[' expand ']
$b = ' expanded '; $b Assignment
$_session[$b] [$a] = true; Set Session value


------Solution--------------------
Not surprisingly, it is a session two-dimensional array.
------Solution--------------------
is an array problem
$_session[' expanded ']= $ABC
$_get[' Expand ']=2
In exchange for that.
$ABC [2]=true
This is a typical array notation.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.