Jump to content

Variable returns result of equation -- is there a way to echo equation from var?


thepip3r

Recommended Posts

$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)"

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.