tablice - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of tablice.php

  1. <?php
  2.  
  3. for($i=0;$i<20;++$i){
  4.     $dataczas[$i] = $i;
  5. for($j=0;$j<9;++$j){
  6.     $tablica[$i][$j] = $i;
  7. }
  8. }
  9. $example_data = [];
  10. for($i=0;$i<20;++$i){
  11. $example_data = array_merge($example_data, array(
  12.           array($dataczas[$i],$tablica[$i][1],$tablica[$i][2],$tablica[$i][3],$tablica[$i][4],$tablica[$i][5],$tablica[$i][6],$tablica[$i][7],$tablica[$i][8]),
  13. ));
  14. }
  15.  
  16. echo json_encode($example_data);
File Description
  • tablice
  • PHP Code
  • 12 Mar-2021
  • 396 Bytes
You can Share it: