Almost all programming languages consist of keywords, which are special expressions of the language that have a special meaning.
An example of a keyword is the word string, if or echo.
It is important to note that keywords (sometimes also commands)…
Loops in general are used to repeat the same code section (usually over a data set) For each type of task, a different type of loop is suitable, which differs mainly in meaning and syntax. It is also important to note that all types of loops are…
Most languages can be written in different ways, with the same result. At the same time, once you have written the code, you will probably read it sometime in the future and correct it or add new features.
Therefore, to avoid having to think about…
The echo construct is used to dump a variable or string into the source code.
Support:
All versions
Brief description:
Output one or more strings
Type:
command, construct (not a function)
Description
echo 'hello world';
Print "…
Escaping is used to write characters that have different meanings in different contexts.
For example, we want to insert another quotation mark into a string enclosed by quotation marks. How to do it?
There are 2 options:
echo "Levi's jeans"…
Note: This article may be a bit messy for some beginners as it assumes a basic understanding of PHP. If you're interested in how conditions work, read about conditions in the beginner's course.
Support:
All versions: PHP 4, PHP 5, PHP 7
…
Every PHP script consists of commands and functions, together these are called constructs. When the script is processed, these language expressions are tracked (this process is called tokenization) and based on the keywords the interpreter decides…
The date() function is a tool for working with date and time. It is used in two cases:
Finding the current state, i.e. the current date, time, ... and outputting it in a specific format,
Converting a specific date into another format (for example…
Knowing how to create a website and then take comprehensive care of it is not just a matter of making it. There are many hurdles along the way and it's good to have at least a basic idea of each thing. When I started out, I didn't really know what…
Warning: This article was written many years ago and some information may be outdated or incorrect. Please bear this in mind when reading.
No more linear programs! The most basic principle of any program is "what happens when....". A…
print - String output
Description
print 'Hello World!';
print(), is not really a real function (it's a language construct), so you don't need to use parentheses.
Parameters
arg
Output parameter
Return values
Always returns the number 1.
Note…
In PHP, you can often replace quotation marks with apostrophes and achieve the same effect. Sometimes we even use a combination of quotes and apostrophes on purpose to achieve different output without having to use escaping.
TLDR: Using quotes can…
This is a very brief list of basic concepts that every beginning developer should know. I use them all across articles.
For programmers
Program - an independently running task for a computer.
Script - a series of instructions that are executed by…