Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.17 KB | None | 0 0
  1. <?php
  2. $rumus1 = "tan('a')*('Wo'+2)";
  3.  
  4. $k[0] = 'a';
  5. $k[1] = 'Wo';
  6.  
  7. $v[0] = 2;
  8. $v[1] = 3;
  9.  
  10. $res = str_replace($k, $v, $rumus1);
  11. eval("\$final = $res;");
  12. echo $final;
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement