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..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 unlink fulfills the function of deleting a file.
Leer mas..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..Today we will see PHP trim which does this function where I can use it. This function removes white space from the beginning and end of a string by default.
Leer mas..