Subtract 1 month with PHP
For Subtract 1 month use this code: Please replace your date with ‘2012-12-12‘.
For Subtract 1 month use this code: Please replace your date with ‘2012-12-12‘.
With PHP we can easily manage mathematical operations in a very intuitive way. In this lesson of our guide, we will learn how to count within our applications. Mathematical Operators Of PHP The main mathematical operators foreseen by the PHP syntax are: Operator Operation + Addition – Subtraction * Multiplication / Division % Module The only mathematical operator to request … Read more
A constant, as the name suggests is a portion of memory whose content does not change during the processing phase of our program in PHP. Unlike the variable, which once defined can change its value, the constant always remains the same and any “attempt” to change its value will produce an error. To define a constant in PHP we use … Read more
One of the basic elements of any programming language (including PHP ) are certainly the variables . What is a variable? The variable can be defined as a memory area in which information is saved (to which the programmer assigns a particular identifier) which can change during the processing phase of the program itself. In PHP all variables start … Read more
PHP comments are “notes” that the programmer adds to the code for convenience. These are “notes”, simple text that is neither processed nor printed on video: in practice, these are internal references that can only be read by the developer who works on the source code of the script. For example, it may be useful to … Read more
In this practical lesson, we will see how you can combine PHP code with common HTML. In fact, PHP is an HTML-Embedded Language, that is, it allows you to combine both PHP instructions and simple HTML code within the same file. Let’s take an example of a “mixed” .php page consisting of both PHP and HTML. Obviously … Read more
Starting from this lesson we will see how to write the first lines of code in the PHP language. we will see, in practice, how to define instructions which will then have to be translated by the webserver (through the interpreter installed in it). we talk in this case of server-side scripting as the processing … Read more
In this guide, we will try to understand together the basics of one of the most used server-side scripting languages on the Web. PHP or more precisely PHP Hypertext Preprocessor. It is good to point out right away that the purpose of this manual is to be a basic guide to PHP and therefore to provide basic knowledge to those who, … Read more