わかりました、私は自分の PC で頭を悩ませています…。何が起こっているのかわかりません。PHP を使用して、リモート データベースへの SOAP 呼び出しを行っています... 4 つのクエリを実行し、2 つの多次元配列をマージして返しています。
配列はきれいに見えますが、結果を表示すると繰り返しています。
呼び出し後の一例を次に示します。
$row = $response;
$count = count($row);
for($i=0;$i<=$count-1;$i++){
$product = $row[$i]['Product'];
$color = $row[$i]['Color'];
$type = $row[$i]['Type'];
$length = $row[$i]['Length'];
$render = '<li><div id="somediv">strong>' . $product . '</strong><br />Color: ' . $color . '<br />' . ‘ Size: ' . $length . '<input type="button" value="value" onclick="someaction(' . $i . ')" />' . '</div></li>';
}
返された配列から繰り返される問題を次に示します。
[11] => Array (
[Product] => Some Product
[Color] => Some Color
[Type] => C
[Length] => 150
)
ただし、同じことが繰り返されます..これは、ほんの一握りの製品でのみ行われます。
いくつかの製品
の色: いくつかの色
サイズ: 150
価格: 4.79
</li>
いくつかの製品
の色: いくつかの色
サイズ: 150
価格: 4.79
</li>
いくつかの製品
の色: いくつかの色
サイズ: 150
価格: 4.79
</li>
いくつかの製品
の色: いくつかの色
サイズ: 150
価格: 4.79
</li>