phpist

Untitled

Oct 16th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. что за ошибки
  2.  
  3.  
  4.  
  5. ( ! ) Notice: Undefined variable: matrix in /var/www/php.xxx/1/instruct/for.php on line 2
  6. Call Stack
  7. #
  8. Time
  9. Memory
  10. Function
  11. Location
  12. 1
  13. 0.0008
  14. 394216
  15. {main}( )
  16. .../for.php:0
  17.  
  18. ( ! ) 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
  19. Call Stack
  20. #
  21. Time
  22. Memory
  23. Function
  24. Location
  25. 1
  26. 0.0008
  27. 394216
  28. {main}( )
  29. .../for.php:0
  30. Найден нулевой элемент в матрице!
  31.  
  32. <?php ## Демонстрация цикла for
  33. for ($i = 0; $i < count($matrix); $i++) {
  34. for ($j = 0; $j < count($matrix[$i]); $j++) {
  35. if ($matrix[$i][$j] == 0) break(2);
  36. }
  37. }
  38. if ($i < 10) echo 'Найден нулевой элемент в матрице!';
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment