You can use subscript variables in your program, which means that the whole array of these variables is the same as the data type of each variable.
when each element in an array has only one subscript, the array is called a one-dimensional array.
A one-dimensional array is a single array of structures arranged in a simple sort structure, consisting of numbers. A one-dimensional array is the most basic array in a computer program. Two-dimensional and multidimensional arrays can be thought of as multiple overlays of one-dimensional arrays.
A two-dimensional array is essentially an array of array elements, an array of arrays.
This article mainly introduces PHP implementation of a one-dimensional array to two-dimensional array of methods, examples of the PHP operation of the array of techniques, with a certain reference value, the need for friends can refer to the next
In this paper, we describe the method of implementing one-dimensional array to two-dimensional array in PHP. Share to everyone for your reference. The implementation method is as follows:
<?php $ASR [1] = Array ("A", "B", "C", "D"), $ASR [2] = Array ("A", "B", "C", "D"), $ASR [3] = Array ("A", "B", "C", "D"); $newarray = Array (), foreach ($asr as $a) {$newarray [] = $a;} Print_r ($newarray);? >