php - 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 php.php

  1. <?php
  2. $cars = array(array("Mercedes", 12, 16),
  3.                 array("BMW", 34, 51),
  4.                 array("Audi", 62, 85),
  5.                 array("VW", 12, 32));
  6. echo $cars[0][0]." In stock ".$cars[0][1]." sold ".$cars[0][2]."<br>";
  7. echo $cars[1][0]." In stock ".$cars[1][1]." sold ".$cars[1][2]."<br>";
  8. echo $cars[2][0]." In stock ".$cars[2][1]." sold ".$cars[2][2]."<br>";
  9. echo $cars[3][0]." In stock ".$cars[3][1]." sold ".$cars[3][2]."<br>";
File Description
  • php
  • PHP Code
  • 20 Apr-2022
  • 445 Bytes
You can Share it: