Php 'Continue' will tell it to skip the current iteration block, but continue on with the rest of the loop. Works in all scenerios (for, while, etc.).But I want to skip the rest of the loop.I tried it using break;But not work.
if ($column_names > 0) {
foreach ($column_names as $heading) {
foreach ($heading as $column_heading)
if($column_heading == "trip_id"){
break;
}
if($column_heading == "number_of_pessengers"){
$column_heading = "No. pessengers";
}
$cellWidth = $pdf->GetStringWidth($column_heading);
$pdf->Cell($cellWidth + 2, 10, $column_heading, 1);
}
}
What's the wrong in my code.