Jump to content

Store the date in @va and print it


Recommended Posts

This little piece of simple code stores the date in @va and then prints it. There is no input and there is output.



(locations 1_0x0_1)
//store today's date in @va
@va[1]['date']['day'] = date('d'); //store day
@va[1]['date']['month'] = date('m'); //store month
@va[1]['date']['year'] = date('y'); //store year
//print date from @va
echo @va[1]['date']['month'] . "/" . @va[1]['date']['day']  . "/" . @va[1]['date']['year'] . "<br />";
echo "m/d/y";
For example, what the output would look like today is





Edited by Rophs
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.

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.

  • Forum Statistics

    Total Topics
    Total Posts
  • Recently Browsing

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

  • Create New...