The idea of ​​associative array code? I do not know.

$array name = array ('key name' =>'value 1',…);

Is that the formula? But

('key name' = 'value 1',…);

Is n’t it good?
Should I remember it as such a rule?
Does that mean that "the value of that key name is 1" is not equal?

We look forward to your response.

  • Answer # 1

    Is it impossible to abandon the idea of ​​thinking in connection with the meaning of a sign?

    If you can't think of it like that, then you can't move on.

    If you can't accept the idea, you can create your own language.

  • Answer # 2


    Is it better to remember this as a rule?



    Isn't that "the value of the key name is 1" is not equal?

    In many programming languages, = is an assignment,
    It is different from the equal in mathematics.
    In this case,
    If 'key name' = 'value 1', it means that the value 1 is assigned to the key name, and the associative array breaks down.

  • Answer # 3

    That's the rule.
    In =, it becomes assignment.
    Nothing is PHP specification.
    The program works only as written.