Category: PHP Tutorial

python tutorials and learn python

Created with Sketch.

PHP require

PHP require Summary: in this tutorial, you will learn how to use the PHP require construct to load the code from a file into the current script. Introduction to the PHP require construct PHP require construct loads the code from an file into a script and executes that code. The following shows the syntax of…
Read more

PHP include_once

PHP include_once Summary: in this tutorial, you will learn how to use the PHP include_once construct to include a file once. Introduction to the PHP include_once construct In the include tutorial, you learned how to load the code from another file using the include construct. Sometimes, you may have a file that is included more…
Read more

PHP Include

PHP Include Summary: in this tutorial, you will learn how to include code from a file using the PHP include construct. Introduction to the PHP include construct The include construct allows you to load the code from another file into a file. Here’s the syntax of the include construct: include ‘path_to_file’; Code language: PHP (php)…
Read more

PHP array_reduce

PHP array_reduce Summary: in this tutorial, you will learn how to use the PHP array_reduce() function to reduce an array to a single value. Introduction to the PHP array_reduce function The array_reduce() function reduces an array to a single value using a callback function. It’s easier to understand the array_reduce() function by example. The following…
Read more

PHP array_filter Function

PHP array_filter Function Summary: in this tutorial, you’ll learn how to use the PHP array_filter() function to filter elements of an array using a callback function. Introduction to PHP array_filter() function When you want to filter elements of an array, you often iterate over the elements and check whether the result array should include each…
Read more

PHP array_map

PHP array_map Summary: in this tutorial, you will learn how to use the PHP array_map() function that creates a new array whose elements are the results of applying a callback to each element. Introduction to the PHP array_map() function Suppose that you have an array that holds the lengths of squares: <?php $lengths = [10,…
Read more

PHP is_null

PHP is_null Summary: in this tutorial, you’ll learn how to use the PHP is_null() construct to check if a variable is null. Introduction to the PHP is_null() construct PHP is_null() accepts a variable and returns true if that variable is null. Otherwise, it returns false. is_null(mixed $v): bool Code language: PHP (php) In this syntax,…
Read more

PHP empty

PHP empty Summary: in this tutorial, you’ll learn how to use the PHP empty() construct to check if a variable is empty. Introduction to the PHP empty() construct The empty() construct accepts a variable and returns true if the variable is empty. Otherwise, it returns false. empty(mixed $v): bool Code language: PHP (php) A variable…
Read more

PHP isset

PHP isset Summary: in this tutorial, you will learn how to use the PHP isset() construct to check if a variable is set and not null. Introduction to the PHP isset() construct PHP isset() returns true if a variable is set and not null. isset(mixed $var): bool Code language: PHP (php) The isset() is a…
Read more

PHP Variable Functions

PHP Variable Functions Summary: in this tutorial, you will learn about the PHP variable functions and how to use them to call a function, a method of an object, and a class’s static method. Introduction to PHP variable functions Variable functions allow you to use a variable like a function. When you append parentheses ()…
Read more