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

  1. <?php
  2.         //Enter your code here, enjoy!
  3.  
  4. $arr = [200, 100, 50, 20, 10, 5, 2, 1];
  5. $val = 148;
  6. $result = [];
  7.  
  8. foreach($arr as $item){
  9.     if($val / $item > 1)
  10.     {
  11.         $result[] = $item;
  12.     }
  13. }
  14.  
  15. var_dump(implode(',', $result));
  16.  
  17.  
File Description
  • mm
  • PHP Code
  • 14 Mar-2021
  • 238 Bytes
You can Share it: