1 Задание - 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 1 Задание.php

  1. <?php
  2. $product1 = "чайник";
  3. $product2 = "кофейник";
  4. $product3 = "кипятильник";
  5. $price1 = 300;
  6. $price2 = 150;
  7. $price3= 270;
  8. $middle = ($price1+$price2+$price3)/3;
  9. echo "$product1=>$price1"."\n";
  10. echo "$product2=>$price2"."\n";
  11. echo "$product3=>$price3"."\n";
  12. echo "__________________________"."\n";
  13. echo "Средняя цена товаров = $middle руб";
  14. ?>
  15.  
File Description
  • 1 Задание
  • PHP Code
  • 13 Sep-2022
  • 391 Bytes
You can Share it: