Please help. There is such code:

for ($x = $nach; $x <$end; $x++) { echo $buf2 = $arr_res[$i][2]; echo '<br>'; if ($buf2 = $x) { echo $x.' '.$buf2.' '; } } echo '<br>'; 

$ nach = 9; $ end = 17;
$ arr_res [$ i] [2] - either 10 or 12
Why do I get the following?

 10 9 9 10 10 10 10 11 11 10 12 12 10 13 13 10 14 14 10 15 15 10 16 16 12 9 9 12 10 10 12 11 11 12 12 12 12 13 13 12 14 14 12 15 15 12 16 16 

I mean, what kind of $buf2 equal to $x ?

    1 answer 1

    $buf2 = $x - assignment operation

    $buf2 == $x and $buf2 === $x - comparison operations