CategoryPHP References

php foreach() keyword

p

In this article, you will learn how to create a foreach loop in PHP. The foreach keyword is used to create foreach loops, which loops through a block of code for each element in an array. what is the syntax of the FOREACH() function in php? foreach examples of the FOREACH() function Example 1. In this example, we close a foreach loop block. <?php $cars = ["Ford", "Volvo"...

PHP is_object() Function

P

In this article, you will learn how to check if a variable is an object of not. In PHP the is_object() function checks if a variable is an object. This function returns true (1) if the variable is an object, otherwise it returns false/nothing. what is the syntax of the IS_OBJECT() function in php? is_object(variable); ParametersDetailsvariableRequired – Specifies the variable to checkPHP...

PHP output_reset_rewrite_vars() Function

P

In this article, you will learn how to resets the URL rewriter and removes all rewrite variables previously set by the output_add_rewrite_var() function. The PHP OUTPUT_RESET_REWRITE_VARS() function resets the URL rewriter and removes all rewrite variables previously set by the output_add_rewrite_var() function. what is the syntax of the OUTPUT_RESET_REWRITE_VARS() function in php...

PHP is_numeric() Function

P

In this article, you will learn how to check if a number is numeric or not in PHP. The PHP is_numeric() function checks whether a variable is a number or a numeric string. This function returns true (1) if the variable is a number or a numeric string, otherwise it returns false/nothing. what is the syntax of the IS_NUMERIC() function in php? is_numeric(variable); ParametersDetailsvariableRequired...

PHP is_real() Function

P

In this article, you will learn how to check if a number is real or not in PHP. The PHP is_real() function checks whether a variable is of type float or not. This function is an alias of is_float(). what is the syntax of the IS_REAL() function in php? is_real(variable); ParametersDetailsvariableRequired. Specifies the variable to checkPHP IS_REAL() method examples of the IS_REAL() function...

PHP is_resource() Function

P

In this article, you will learn how to check if a variable is resource variable or not. The PHP is_resource() function checks whether a variable is a resource or not. Note: The is_resource() function will return FALSE if the resource has been closed. This function returns true (1) if the variable is a resource, otherwise it returns false/nothing. what is the syntax of the IS_RESOURCE() function...

PHP is_scalar() Function

P

In this article, you will learn how to check if a variable is scalar or not in PHP. The PHP is_scalar() function checks whether a variable is a scalar or not. This function returns true (1) if the variable is a scalar, otherwise it returns false/nothing. Integers, floats, strings, or boolean can be scalar variables. Arrays, objects, and resources are not. what is the syntax of the IS_SCALAR()...

PHP is_string() Function

P

In this article, you will learn how to check if a variable type is string in PHP. The PHP is_string() function checks whether a variable is of type string or not. This function returns true (1) if the variable is of type string, otherwise it returns false/nothing. what is the syntax of theIS_STRING() function in php? is_string(variable); ParametersDetailsvariableRequired. Specifies the variable...

PHP isset() Function

P

In this article, you will check if a variable is set or unset in PHP. The PHP isset() function checks whether a variable is set, which means that it has to be declared and is not NULL. This function returns true if the variable exists and is not NULL, otherwise it returns false. Note: If multiple variables are supplied, then this function will return true only if all of the variables are set...

PHP print_r() Function

P

In this article, you will learn how to get the information about a variable in PHP. The PHP print_r() function prints the information about a variable in a more human-readable way. what is the syntax of the PRINT_R() function in php? print_r(variable, return); ParameterDescriptionvariableRequired. Specifies the variable to return information about returnOptional. When set to true, this...

Tutor Network

Learn PHP from A to Z