For array loops, I have a two-dimensional array such as: & nbsp; $ matrix_detail = array ('x' = & gt; array ('horizontal 1', 'horizontal 2 ', 'horizontal 3'), 'y' = & gt; array ('vertical 1', 'vertical 2', 'vertical 3', 'vertical 4'); & nbsp; according to this question about array loops
I have a two-dimensional array, such:
$ Matrix_detail = array ('x' => array ('horizontal 1', 'horizontal 2', 'horizontal 3'), 'y' => array ('vertical 1 ', 'vertical 2', 'vertical 3', 'vertical 4 '));
You can use this array to loop through the following results:
Horizontal 1 Horizontal 2 horizontal 3
Vertical 1 O
Vertical 2 O
Vertical 3 O
4 O
No way to start. please give me some advice. Thank you.
------ Solution --------------------
PHP code
Foreach ($ matrix_detail ['Y'] as ykey => yvalue) {foreach ($ matrix_detail ['x'] as xkey => xvalue ){....}}