PHP 8.4.24 Released!

Voting

: two minus zero?
(Example: nine)

The Note You're Voting On

renatoaraujoleal at gmail dot com
1 year ago
<?php
$array = [
    [1, 2, 3],
    [3, 4, 6],
];

foreach ($array as [$a, $b]) {
    // Observe que não existe $c aqui.
    echo "$a $b\n";
}

foreach ($array as [, , $c]) {
    // Pulando $a e $b
    echo "$c\n";
}
?>

I would like to correct this example above!
The answer of this algorithm is:

1 2
3 4
3
6

<< Back to user notes page

To Top