// 届先情報 <ここから>
$objShip = new SC_Helper_Purchase_Ex();
$this->arrShip = $objShip->getShippings($this->arrDisp['order_id']);
$y = 144; // お届け先開始y軸位置
$count = count($this->arrShip);
$i = 0; // 配列のindex
$j = 0; // 届け先取り出し数
$k = 0; // 要素数
do {
if ($j == $count) {
break;
}
if ($this->arrShip[$i]['shipping_id'] != "") {
$y += $j * 2 * $k; // 届け先 * 高さ * 要素数
$k = 0;
$text = "[お届け先". (string)($j + 1) . "]";
$this->lfText(23, $y, $text, 10);
$y += 4;
$k += 1;
$text = "〒"
. $this->arrShip[$i]['shipping_zip01']
. "-"
. $this->arrShip[$i]['shipping_zip02']
. " "
. $this->arrPref[$this->arrShip[$i]['shipping_pref']]
. $this->arrShip[$i]['shipping_addr01']
. $this->arrShip[$i]['shipping_addr02'];
$this->lfText(25, $y, $text, 10);
$y += 4;
$k += 1;
$text = $this->arrShip[$i]['shipping_name01'] . " " . $this->arrShip[$i]['shipping_name02'] . " 様";
$this->lfText(25, $y, $text, 10);
for ($l = 0; $l < count($this->arrShip[$i]['shipment_item']); $l++) {
$y += 4;
$k += 1;
$text = "商品名 : " . $this->arrShip[$i]['shipment_item'][$l]['product_name'];
$this->lfText(25, $y, $text, 10);
}
$j += 1;
}
$i += 1;
} while (true);
// <ここまで>
・高さを「4」から「2」へ変更しました。
・Cell上端y軸位置を$yとの関係式にすべきですが、
$this->lfText()と$this->pdf->Cell()座標値の関係がわからず、
断念しました。