<?php
$all_price = array();
while($row = mysql_fetch_assoc($sql)):
$i++;
if(checkKod($i)):
$size = isset($sizes[$row['id']]) ? $sizes[$row['id']] : $S_1_s1;
$sum = $row['price'] * $size;
if($sum != 0):
$pdf->Row(
array(
'id' => $row['id'],
'name' => $row['name'],
'size' => $size,
'type' => $row['type'],
'price' => $row['price'],
'sum' => $sum
)
);
$all_price [] = $sum;
endif;
endif;
endwhile;
echo array_sum($all_price);
while($row = mysql_fetch_assoc($sql)):
$i++;
if(checkKod($i)):
$size = isset($sizes[$row['id']]) ? $sizes[$row['id']] : $S_1_s1;
$sum = $row['price'] * $size;
if($sum != 0):
$pdf->Row(
array(
'id' => $row['id'],
'name' => $row['name'],
'size' => $size,
'type' => $row['type'],
'price' => $row['price'],
'sum' => $sum
)
);
endif;
endif;
endwhile;