Android Question Dynamic creation of populated variables

Kevin Hartin

Active Member
Licensed User
One thing I find really useful in PHP is the ability to dynamically create variables from the results of a SQL query using something like;

Dynamic variables:
foreach ($rw as $key=>$val) {
   ${$key} = $val;
    $_SESSION[$key] = $val;
}

Is there a technique to do the same in B4x?

Thanks,
Kev
 

Kevin Hartin

Active Member
Licensed User
Maybe you could use a Map, using text from any source and use it as a Map key.

Obviously it's not quite the same but it might help you.
I thought that may be the closest thing.

I haven't done much with maps but recently discovered File.WriteMap and File.ReadMap to save some app settings in a file for use the next session. I have also sucessfully encrypted and decrypted this, which is handy.

Thanks,
Kev
 
Upvote 0
Top