I'm trying to escape out of a main foreach statement. In Perl you can use something like;
As I'm sure you can guess, this basically skips the array, and moves onto the next array. Basically, I'm trying to do a similar thing in PHP;
The problem is, that I'm not sure of the syntax. Does anyone know? The current format gives me a parse error.
Any help is much appreciated
Cheers
Andy
Code:
NAME: foreach (@array) {
if ($var eq "testing") { next NAME; }
}
As I'm sure you can guess, this basically skips the array, and moves onto the next array. Basically, I'm trying to do a similar thing in PHP;
Code:
$count = 0;
[red]GOTHROUGH:[/red] foreach ($titles as $_titles) {
if ($_titles == "$title") {
if ($cats[$count] == "$category") {
$found = 1;
[red]continue GOTHROUGH;[/red]
}
} // end the 'if'
// if we don't have a match, then lets put it back in...
if (!$found) {
array_push($back_cats, "$cats[$count]");
array_push($back_titles, "$_titles");
array_push($back_est1, "$ourestimate[$count]");
array_push($back_est2, "$theirestimate[$count]");
array_push($back_est3, "$actualcost[$count]");
array_push($back_assigned, "$assignedto[$count]");
}
// increment the counter...
$count++;
} // end main 'foreach'
The problem is, that I'm not sure of the syntax. Does anyone know? The current format gives me a parse error.
Any help is much appreciated

Cheers
Andy