Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- что за ошибки
- ( ! ) Notice: Undefined variable: matrix in /var/www/php.xxx/1/instruct/for.php on line 2
- Call Stack
- #
- Time
- Memory
- Function
- Location
- 1
- 0.0008
- 394216
- {main}( )
- .../for.php:0
- ( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/php.xxx/1/instruct/for.php on line 2
- Call Stack
- #
- Time
- Memory
- Function
- Location
- 1
- 0.0008
- 394216
- {main}( )
- .../for.php:0
- Найден нулевой элемент в матрице!
- <?php ## Демонстрация цикла for
- for ($i = 0; $i < count($matrix); $i++) {
- for ($j = 0; $j < count($matrix[$i]); $j++) {
- if ($matrix[$i][$j] == 0) break(2);
- }
- }
- if ($i < 10) echo 'Найден нулевой элемент в матрице!';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment