php logo
PHP while and do-while statements

One of the simplest ways PHP has to create a loop or repeat a block of code while a condition is met is while, and we can also use do-while to go through the block at least once.

Leer mas..
php logo
PHP if statement

In this section, we will see the different ways to use the PHP if statement. This control structure allows us to execute code depending on a condition. In the following sections, we will refer to this condition as an expression. Expressions can be formed with comparison and logical operators to obtain a boolean result. if […]

Leer mas..
php logo
PHP switch statement 

Sometimes we want to compare the same variable with different values, and that’s where the PHP switch statement comes in. In the following example, we compare the variable $i with the values 0, 1, 2. switch ($i) { case 0: echo "i es 0"; break; case 1: echo "i es 1"; break; case 2: echo […]

Leer mas..
php logo
PHP unlink function

PHP unlink fulfills the function of deleting a file.

Leer mas..
php logo
PHP str_replace function

The PHP function str_replace will replace all occurrences of a given text or texts ($search) in a string ($subject) or array of strings with a string given as a parameter/s ($replace).

Leer mas..
la categoria en-php tiene 121 post/s
Last 4 post in same category

Comments