如果我有 6 个数组,并且每个数组有 6 个值(不是零),并且我想测试一个方程,同时假设它们中的 3 个数组在每个循环中都是零值,我该怎么做?
例子:
我有这 6 个数组:
$row_1 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_2 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_3 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_4 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_5 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_6 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
循环 1:
$row_1 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_2 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_3 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_4 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_5 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_6 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
循环 2:
$row_1 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_2 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_3 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_4 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_5 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_6 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
循环 3:
$row_1 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_2 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_3 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_4 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_5 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_6 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
循环 4:
$row_1 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_2 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_3 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_4 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_5 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_6 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
循环 5:
$row_1 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_2 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_3 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_4 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_5 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_6 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
循环 6:
$row_1 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_2 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_3 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_4 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_5 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_6 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
循环 7:
$row_1 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_2 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_3 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_4 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_5 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_6 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
循环 8:
$row_1 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_2 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_3 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_4 = array(a => 0, b => 0, c => 0, d => 0, e => 0, f => 0);
$row_5 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
$row_6 = array(a => 1, b => 2, c => 3, d => 4, e => 5, f => 6);
………………
循环 n:
…………