-
Üyelik
14.06.2019
-
Yaş/Cinsiyet
35 / E
-
Meslek
Gezgin
-
Konum
Denizli
-
Ad Soyad
B** D**
-
Mesajlar
54
-
Beğeniler
9 / 11
-
Ticaret
0, (%0)
Merhaba mantığınızı çok anlayamadım ama 4. cocuktan sonra puan yazdırmicaksanız bir if kontrol verip yapabilirsiniz
if($cocuksayi!=0){
$cocuksayi=$cocuksayi+13;
for($i=14;$i<=$cocuksayi;$i++){
if($i < 4){
$objPHPExcel->getActiveSheet()->setCellValue('B'.$i, "$sehir1".' - '."$sehir2");
$objPHPExcel->getActiveSheet()->setCellValue('C'.$i, "Çocuk İsmi");
$objPHPExcel->getActiveSheet()->setCellValue('D'.$i, "Çocuk");
$objPHPExcel->getActiveSheet()->setCellValue('E'.$i, "1");
$objPHPExcel->getActiveSheet()->setCellValue('F'.$i, "=C6");
$objPHPExcel->getActiveSheet()->setCellValue('G'.$i, "=F".$i."*E".$i);
$objPHPExcel->getActiveSheet()->setCellValue('I'.$i, "OTO");
$objPHPExcel->getActiveSheet()->setCellValue('J'.$i, "$bilet");
$objPHPExcel->getActiveSheet()->setCellValue('K'.$i, "=G".$i."*10");
$objPHPExcel->getActiveSheet()->setCellValue('P'.$i, "=K".$i."+J".$i."+G".$i);
}
else{
$objPHPExcel->getActiveSheet()->setCellValue('B'.$i, "$sehir1".' - '."$sehir2");
$objPHPExcel->getActiveSheet()->setCellValue('C'.$i, "Çocuk İsmi");
$objPHPExcel->getActiveSheet()->setCellValue('D'.$i, "Çocuk");
$objPHPExcel->getActiveSheet()->setCellValue('E'.$i, "1");
$objPHPExcel->getActiveSheet()->setCellValue('F'.$i, "=C6");
$objPHPExcel->getActiveSheet()->setCellValue('G'.$i, "=F".$i."*E".$i);
$objPHPExcel->getActiveSheet()->setCellValue('I'.$i, "OTO");
$objPHPExcel->getActiveSheet()->setCellValue('J'.$i, "0"); // $bilet yerine 0 yazdık
$objPHPExcel->getActiveSheet()->setCellValue('K'.$i, "=G".$i."*10");
$objPHPExcel->getActiveSheet()->setCellValue('P'.$i, "=K".$i."+J".$i."+G".$i);
}