phpist

Untitled

Oct 16th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. ( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/php.xxx/1/instruct/for.php on line 5
  2. Call Stack
  3. # Time Memory Function Location
  4. 1 0.0008 394208 {main}( ) .../for.php:0
  5.  
  6. ( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/php.xxx/1/instruct/for.php on line 6
  7. Call Stack
  8. # Time Memory Function Location
  9. 1 0.0008 394208 {main}( ) .../for.php:0
  10. Найден нулевой элемент в матрице!
  11.  
  12.  
  13.  
  14. <?php ## Демонстрация цикла for
  15. $matrix = "kkkkk";
  16.  
  17.  
  18. for ($i = 0; $i < count($matrix); $i++) {
  19. for ($j = 0; $j < count($matrix[$i]); $j++) {
  20. if ($matrix[$i][$j] == 0) break(2);
  21. }
  22. }
  23. if ($i < 10) echo 'Найден нулевой элемент в матрице!';
  24. ?>
Add Comment
Please, Sign In to add comment