4 set prices - 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 4 set prices.php

  1.  
  2.  
  3.  
  4. //Php code to genarate starting price point ; ready for easy copy paste---></br>
  5.  
  6.  
  7.  
  8. <?php
  9.  
  10.  
  11. $userInput=1.125;
  12. $modifiedUserInput=$userInput+.01;
  13.  
  14. $twentyPips=20*10*.00001;
  15.  
  16. //First for loop starts here
  17.  
  18. for ( $i=0; $i<=9; $i++){
  19.     
  20.     $result=$modifiedUserInput-($twentyPips*$i);
  21.     $countRight=$i+1;
  22.     
  23.     
  24.     echo "input double Price$countRight=$result; </br>";
  25.     
  26.     
  27. }//<--end first for loop
  28.  
  29. echo "First set ends here ...First set ends here...First set ends here</br>";
  30.  
  31. $modifiedUserInput=$modifiedUserInput-.0005;
  32.  
  33. //second for loop starts here
  34.  
  35. for ( $i=0; $i<=9; $i++){
  36.     
  37.     $result=$modifiedUserInput-($twentyPips*$i);
  38.     $countRight=$i+1;
  39.     
  40.     
  41.     echo "input double Price$countRight=$result; </br>";
  42.     
  43.     
  44. }//<--end second for loop
  45.  
  46.  
  47. echo "Second set ends here...Second set ends here...Second set ends here </br>";
  48.  
  49.  
  50. $modifiedUserInput=$modifiedUserInput-.0005;
  51.  
  52. //Third for loop starts here
  53.  
  54. for ( $i=0; $i<=9; $i++){
  55.     
  56.     $result=$modifiedUserInput-($twentyPips*$i);
  57.     $countRight=$i+1;
  58.     
  59.     
  60.     echo "input double Price$countRight=$result; </br>";
  61.     
  62.     
  63. }//<--end third for loop
  64.  
  65.  
  66. echo "Third set ends here...Third set ends here...Third set ends here </br>";
  67.  
  68. $modifiedUserInput=$modifiedUserInput-.0005;
  69.  
  70. //Fourth for loop starts here
  71.  
  72. for ( $i=0; $i<=9; $i++){
  73.     
  74.     $result=$modifiedUserInput-($twentyPips*$i);
  75.     $countRight=$i+1;
  76.     
  77.     
  78.     echo "input double Price$countRight=$result; </br>";
  79.     
  80.     
  81. }//<--end Fourth for loop
  82.  
  83.  
  84. echo "Fourth set ends here...Fourth set ends here...Fourth set ends here </br>";
  85.  
  86.  
  87.  
  88. ?>
  89.  
  90.  
  91.  
File Description
  • 4 set prices
  • PHP Code
  • 11 Sep-2019
  • 1.55 Kb
You can Share it: