34432 - 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.
Result of php executing
Full code of 34432.php
- <?php
- $arr=['a', 'b', 'c'];
- var_dump($arr)
- ?>
- <br /><br />
- <?php
- $arr=['a', 'b', 'c'];
- echo $arr[0], $arr[1], $arr[2]
- ?>
- <br /><br />
- <?php
- $arr=['a', 'b', 'c', 'd'];
- echo $arr[0],'+', $arr[1], ' ', $arr[2],'+', $arr[3]
- ?>
- <br /><br />
- <?php
- $arr=['2', '5', '3', '9'];
- $result=$arr[0]*$arr[1];
- $result1=$arr[2]*$arr[3];
- echo $result, ' ', $result1
- ?>
- <br /><br />
- <?php
- $arr[]= 1;
- $arr[]= 2;
- $arr[]= 3;
- $arr[]= 4;
- $arr[]= 5;
- ?>
- <br /><br />
- <?php
- $arr = ['a'=>1, 'b'=>2, 'c'=>3];
- echo $arr['c']
- ?>