Subtract day with PHP

For Subtract 1 day use this code: please replace your date with ‘2012-12-12‘. For Subtract 7 days use this code: please replace your date with ‘2012-12-12‘. For Subtract 30 days use this code: please replace your date with ‘2012-12-12‘.

Mathematical Operations In PHP

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

The Constants In PHP

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

The Variables In PHP

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

The first line of PHP- Echo, and Print

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