thepip3r Posted April 21, 2009 Share Posted April 21, 2009 $thc = round(((($_GET['h'] / 25.4) * ($_GET['w'] * .01) * 2) + $_GET['d']), 2); so... $thc ends up being the result of an equation. my question is: Is there some function that will show the EQUATION itself using the variable $thc or do I have duplicate rewrite the equation preformatted to show the equation? so... for example: echo $thc; //gives something like 28.80 //and print_pre($thc); //gives "round(((($_GET['h'] / 25.4) * ($_GET['w'] * .01) * 2) + $_GET['d']), 2)" Quote Link to comment Share on other sites More sharing options...
soak Posted April 21, 2009 Share Posted April 21, 2009 Can't you just echo: <?php echo 'round(((($_GET[\'h\'] / 25.4) * ($_GET[\'w\'] * .01) * 2) + $_GET[\'d\']), 2) = '.$thc; Quote Link to comment Share on other sites More sharing options...
thepip3r Posted April 21, 2009 Author Share Posted April 21, 2009 i want to echo the equation in a different place than i'm assigning. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.