php foreach skip to next

35

foreach(array_slice($arr,1) as $key=>$value)
{
    echo $value;
}
$numbers = array( 1, 2, 3, 4, 5, 6, 7, 8, 9 );
foreach( $numbers as $number ) {
    if ( $number == 4 ) { continue; }
    // ... snip
}

Comments

Submit
0 Comments