Solved

What does this code snippet value represent?

Posted on 2011-02-15
2
342 Views
Last Modified: 2012-08-14
I have this code snippet:

                    $today = date('Ymd');
                    $dateCompare = date('Y') . '0507';
                    if ($today < $dateCompare) {

And I want to know what does the 0507 represent? Is it a date format or something? It looks like it is comparing the Year to 0507...but I don't understand it.

Any help would be appreciated.
0
Comment
Question by:Donnie Walker
2 Comments
 
LVL 10

Accepted Solution

by:
jfromanski earned 500 total points
ID: 34897528
$today is Ymd, eg. 20110215
$dateCompare is concatenation of two strings: Y and '0507' - this will give eg. 20110507
0
 

Author Closing Comment

by:Donnie Walker
ID: 34897559
Thank you sir!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now