How to get the current date and time in PHP

As you will notice in this article, it's very easy to work with the dates in the PHP. You may obtain both the server and request times in a single line of code and customize the date strings according to your needs by using the formatting options. To get the current local date or time, …

Loop through an array in JavaScript

This article will be very helpful if you are learning the JavaScript programming language and trying to write a custom code that manipulates or reads data in the Arrays. A very common case in web development is that you need to iterate over some items in the array and perform a desired action, for example, …

How to undo the last local commit in Git repository

The Git is a very popular version control system, it's widely adopted and almost every professional developer has to know how to use it correctly. Open source web applications and other types of software are very often stored on the public Git repositories, the enterprise and private projects also use this version control system. And, …

HTML button that acts like a link

If you are making some web application and you need to redirect user to another page, you can create a button that will act link a link. Regular <a href="#"> tag may not be suitable in some cases, for example, when you have complex logic or unusual content on a form. This article contains information …

How to disable text selection highlighting in CSS

In many cases, web browsers allow the user to select text elements on a page. However, this may not be the desired option in specific situations. You may want to avoid such behavior when adding buttons, links or any other non-standard elements to your HTML code. To solve such an issue, you may add the …