Author Topic: Variables in functions?  (Read 596 times)

Hey, I wanted to create a customizeable script thing, and part of it would be

%test = "Derp";
%derp = getData(%client.bl_id).value%testAmount

To use a variable in that function, would I have to do something like

%eval = "%test = "derp"; getData(%client.bl_id).value" @ %test @ "Amount;";
eval(%eval);

?

Arrays work like names.


This echoes two of the same thing:

%q = "SSS";
echo($myvarSSS);
echo($myvar[%q]);

Arrays work like names.


This echoes two of the same thing:

%q = "SSS";
echo($myvarSSS);
echo($myvar[%q]);

Is that suppost to mean that I need to do
%test = "derp";
%derp = getData(%client.bl_id).value[%test]amount();
?

I don't understand what you are trying to do.

Is that suppost to mean that I need to do
%test = "derp";
%derp = getData(%client.bl_id).value[%test]amount();
?

Huh, you changed from getting just a value to using it in a function.
Try
%derp = getData(%client.bl_id).value[%test];

The "amount" just seems redundant.