October 28, 200916 yr Root Admin comment_46003 Copied From Murs initial Post (no code changed) How to Store values/variables using MDScript [php]//code in item A @vh = "wow thats simple"; store(@vh); //code in item B retrieve(@vh); echo @vh; //will output "wow thats simple" //can be used to store and load entire arrays of data.[/php] Edited October 28, 200916 yr by Chewett Report
December 9, 201510 yr comment_169470 Only one variable can be stored at a time this way. Trying to store another variable will overwrite the one you've previously stored. Code: [php] //let's set some variables @va = "5"; @vb = "2"; //echo them to confirm contents echo @va."<br>"; echo @vb."<br><br>"; //store and retrieve both of them store(@va); store(@vb); retrieve(@va); retrieve(@vb); //echo again to see how they've changed! echo @va."<br>"; echo @vb; [/php] Output: 5 2 2 2 Report
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.