Today's the first day I've really gotten stuck into creating anything from scratch in PHP7. My script skills are pretty rudimentary anyway, so I apologise in advance.
I've been looking at tutorial pages + searching Google/Stack and can't seem to find the answer to a few basic syntax questions about Multidimensional Arrays (MDAs).
The tutorials I've read show MDAs as follows:
MDA Tutorial Example:
http://webcheatsheet.com/php/multidimensional_arrays.php https://www.w3schools.com/php/php_arrays_multi.asp
$a = array(array(array("a", a2, a3),
array("b", b2, b3),
array("c", c2, c3)
),
array(array("a", a2, a3),
array("b", b2, b3),
array("c", c2, c3)
),
array(array("a", a2, a3),
array("b", b2, b3),
array("c", c2, c3)
)
);
As all the layers are simply named array and W3 only calls the parent variable with numerical values for [$row] [$col] it's unclear what solutions there are for naming and labeling elements in the array with custom handles.
Example 6 on PHP.net shows something that looks along the right lines, but it's not an exact demonstration.
Using the array shorthand which I'm more familiar with, would something like this work?
For Example:
$a = [Custom1[Custom2[Custom3["a", a2, a3],
Custom3["b", b2, b3],
Custom3["c", c2, c3]
],
//**does each level require the same naming as the level above
Custom2[Custom3["a", a2, a3],
Custom3["b", b2, b3],
Custom3["c", c2, c3]
],
//**Or Are they independent and customised freely
Fred[Wez["a", a2, a3],
Otto["b", b2, b3],
Sam["c", c2, c3]
]],
];
I'm sure this is a fairly basic question, but as I said, I just couldn't seem to find an answer.