Jump to content

Recommended Posts

Posted (edited)

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

 

[php]

(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";
[/php]
 
For example, what the output would look like today is

 

11/14/14

m/d/y

 

Edited by Rophs

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.1k
    Total Posts
  • Recently Browsing

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

×
×
  • Create New...