ejemplo de un json - 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 ejemplo de un json.php

  1. <?php
  2.  
  3. $array = [
  4.     'n1var1' => 125,
  5.     'n1var2' => 'texto1',
  6.     'n1var3' => [
  7.         'n2var1' =>  125,
  8.         'n2var2' => 'texto2',
  9.         'n1var3' => [
  10.             'n3var1' =>  125,
  11.             'n3var2' => 'texto3',
  12.             ], 
  13.         ], 
  14.     ];
  15.     
  16. echo json_encode($array);
File Description
  • ejemplo de un json
  • PHP Code
  • 07 Oct-2021
  • 290 Bytes
You can Share it: