> Let's do an experiment. Place these two lines of code in a page, then load
> it in a browser;
>
>
> $foo = (36.0*58.0)/144;
> echo $foo;
>
> ?>
>
> works fine for me. If you change
>
>
>
> to
>
>
>
Yep, that does work. Thanks Jay.
Mike
--
PHP General Mailing List (http://www.php.net/
[snip]
> Try;
>
> $foo = preg_replace($find,$replace,$partFormula);
> return $foo
Unfortunately no. I also tried making the formula look like this:
and returning it with:
eval('?>' . $a . '
works fine for me. If you change
to
it also works.
--
PHP General Mailing List (http://www.php.net
> Try;
>
> $foo = preg_replace($find,$replace,$partFormula);
> return $foo
Unfortunately no. I also tried making the formula look like this:
and returning it with:
eval('?>' . $a . 'http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
I have an application that allows the users to input a formula:
(Width*Height)/144
This formula gets updated with a part's specific width & height and
actually returns:
(36.0*58.0)/144
I use preg_replace to replace Width and Height with values from the
following array:
[Width] =>
4 matches
Mail list logo