3v4l.org

run code in 300+ PHP versions simultaneously
<?php while ($row = mysqli_fetch_array($aa, MYSQLI_ASSOC)) { $plotsOpenSpace2 = '111 222 333'; $plotsShell2 = '555 222 444'; $plotsOther2 = '000 999 666'; $entries = array($plotsOpenSpace2, $plotsShell2, $plotsOther2); $test = array(111, 222, 465, 555, 666, 777); foreach ($entries as $key => $entry) { $plotsTotal2 = array_filter($plotsTotal1); $plotsTotal = implode(", ", $plotsTotal2); $matches = array_intersect($test, $plotsTotal1); if (count($matches) > 0) { $i ++; $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, $row['exfreeformcompanyname'].' - '.implode(', ', $matches)); $objPHPExcel->getActiveSheet()->getStyle('A' . $i)->applyFromArray($styleArray)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_TEXT ); } } } ?>

preferences:
34.82 ms | 402 KiB | 5 Q