Root Admin Chewett Posted October 28, 2009 Root Admin Report Posted October 28, 2009 (edited) 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, 2009 by Chewett Quote
Rophs Posted December 9, 2015 Report Posted December 9, 2015 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 Maebius 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.