Category: PHP Tutorial

python tutorials and learn python

Created with Sketch.

PHP Function Parameters

PHP Function Parameters Summary: in this tutorial, you’ll learn about the function parameters and pass arguments by value and reference. Introduction to the PHP function parameters A function can have zero or more parameters: <?php function function_name(parameter_list) { } Code language: HTML, XML (xml) When a function has multiple parameters, you need to separate them…
Read more

PHP Function

PHP Functions Summary: in this tutorial, you will learn about PHP functions and how to define user-defined functions. What is a function A function is a named block of code that performs a specific task. So far, you have learned how to use built-in functions in PHP, such as var_dump() that dumps information about a…
Read more

PHP continue

PHP continue Summary: in this tutorial, you will learn to use the PHP continue statement to skip the current iteration and start the next one. Introduction to the PHP continue statement The continue statement is used within a loop structure such as for, do…while, and while loop. The continue statement allows you to immediately skip…
Read more

PHP break

PHP break Summary: in this tutorial, you will learn how to use the PHP break statement to end the execution of the current for, do…while, whileAnd switch statements. Introduction to the PHP break statement. The break statement terminates the execution of the current for, do…while, while, or switch statement. This tutorial focuses on how to…
Read more

PHP do…while

PHP do…while Summary: in this tutorial, you will learn how to use the PHP do…while loop statement to execute a code block repeatedly. Introduction to PHP do…while loop statement The PHP do…while statement allows you to execute a code block repeatedly based on a Boolean expression. Here’s the syntax of the PHP do-while statement: <?php do…
Read more

PHP while

PHP while Summary: in this tutorial, you will learn how to use the PHP while statement to execute a code block repeatedly as long as a condition is true. Introduction to the PHP while statement The while statement executes a code block as long as an expression is true. The syntax of the while statement…
Read more

PHP for

PHP for Summary: in this tutorial, you will learn about PHP for statement to execute a block of code repeatedly. Introduction to PHP for statement The for statement allows you to execute a code block repeatedly. The syntax of the for statement is as follows: <?php for (start; condition; increment) { statement; } Code language:…
Read more

PHP switch

PHP switch Summary: in this tutorial, you will learn about the PHP switch statement that executes a code block by matching an expression with multiple values. Introduction to the PHP switch statement When the value of a single variable determines the number of different choices, you can use the if…elseif statement. Suppose that you’re building…
Read more

PHP Ternary Operator

PHP Ternary Operator Summary: in this tutorial, you will learn to use the PHP ternary operator to make the code shorter and more readable. Introduction to the PHP ternary operator The ternary operator is a shorthand for the if…else statement. Instead of writing this: <?php if (condition) { $result = value1; } else { $result…
Read more

PHP if elseif

PHP if elseif Summary: in this tutorial, you’ll learn about the PHP if elseif statement to execute code blocks based on multiple boolean expressions. Introduction to the PHP if elseif statement The if statement evaluates an expression and executes a code block if the expression is true: <?php if (expression) { statement; } Code language:…
Read more