Have you ever wondered how do some great websites show the latest date and time, every time you go there or reload the page. What script in the world are they using ? Heck, man! They’re pretty neat effects. Have you ever wondered, how you can get those ? Read along :-Well, the real secret is that these great websites use PHP (Hypertext pre-processor). Sounds bad, codey, geeky, doesn’t it. Well, let me do the hard work for you. I’ve read this a lot and got a simple solution for the problem. All we do is we. Stop. I’ll explain you later. first, you see the code :-
My <span class="hiddenSpellError" pre="My ">php</span> script ......(other code) <!--?<span class="hiddenSpellError" pre=""-->php $todaysdate = date("m",time()) . "-" . date("d",time()) . "-" date("Y",time()); echo $todaysdate; ?>
So, as you can see in the script above, we make a simple php call which makes a variable called todaysdate and appends a value of the time, date, year. And, finally, it echoes todaysdate on the webpage. Simple ! You can use this variable anywhere on the webpage, footer, header, etc. and get yourself going. Great, today we have another tool in our arsenal !
Cheers . Until next time.