Jump to content

How To Store Values/variables Using Mdscript


Chewett

Recommended Posts

  • Root Admin

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 by Chewett
Link to comment
Share on other sites

  • 6 years later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Forum Statistics

    17.5k
    Total Topics
    182.5k
    Total Posts
  • Recently Browsing

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

×
×
  • Create New...