Hello! There is a function that returns a 3-dimensional array, which contains 2 submasives, one 2-dimensional and one simple. Next, the array is displayed under the corresponding HTML template. To do this, I need to extract the subarrays into separate variables, and I know 4 options:
$ subArray1 = $ bigArray ['subArray1']; $ subArray2 = $ bigArray ['subArray2'];
list ($ subArray1, $ subArray2) = $ bigArray;
$ subArray2 = array_pop ($ bigArray); $ subArray1 = array_pop ($ bigArray);
$ subArray1 = array_shift ($ bigArray); $ subArray2 = array_shift ($ bigArray);
I asked myself what is the best in terms of performance and whether there is an alternative way to access each sub-array of a large array by reference.