Blog

python tutorials and learn python

Created with Sketch.

PHP Variable Scopes

PHP Variable Scopes Summary: in this tutorial, you’ll learn about PHP variable scopes, which specify the part of code that can access a variable. Introduction to PHP variable scopes The scope of a variable determines which part of the code can access it. The locations where the variable can be accessible determine the scope of…
Read more

PHP Named Arguments

PHP Named Arguments Summary: in this tutorial, you will learn about PHP named arguments and how to use them effectively in your code. Introduction to the PHP named arguments Since PHP 8.0, you can use named arguments for functions. The named arguments allow you to pass arguments to a function based on the parameter names…
Read more

PHP Default Parameters

PHP Default Parameters Summary: in this tutorial, you’ll learn about PHP default parameters and default parameters to simplify the function calls. Introduction to the PHP default parameters The following defines the concat() function that concatenates two strings with a delimiter: <?php function concat($str1, $str2, $delimiter) { return $str1 . $delimiter . $str2; } Code language:…
Read more

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