in reply to Re: function inline evaluation (formated *gg*)
in thread function inline evaluation (formated *gg*)

In c-era's example, he has
$funk = "cos($i)";
This assumes that the variable $i is alrady defined. When $funk is first assigned, $i is resolved to it's value (3 in the example); so $funk actually equals "cos(3)".

If you want it dynamic, so that you can change $i and not restuff $funk, you should write it like:

$funk="cos(\$i)";
That way you can reassign $i and just eval($funk) again to recompute it's cosine.