V
V
VS2019-08-19 17:58:20
PHP
VS, 2019-08-19 17:58:20

What does this array construct in php do?

Give an illustrative example of array constructions in php. In particular, I am interested in what I will get from this type of array:
$arr[$item[$subItem]] [$num]
Please tell me what this moment means in this code: [$item[$subItem]] ?
ps Variable names are random.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alekseyHunter, 2019-08-19
@defect00

This is a two dimensional array. If $num or $item[$subItem] contains a string, the array is associative, meaning the string is the key, not the number(0,1,2). This is a one dimensional array.
$item[$subItem]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question