Related Topics
PHP array_walk() Function
PHP array_walk() Function The array_walk() function in PHP is used to apply the user-defined callback function to each element of the array. This function returns a Boolean TRUE on success or FALSE on failure. Syntax array_walk ( array &$array , callable $callback [, mixed $userdata = NULL ] ) Parameter array(required)- This array represents...
1 minute read.
PHP lcfirst() Function
PHP lcfirst() Function The lcfirst() function in PHP converts the first character of a string to lowercase if that character is alphabetic. Syntax lcfirst ( string $str ) Parameter str(required)- This parameter signifies the input string. Return This function returns a string with the...
1 minute read.
PHP Functions
PHP functions are used to reuse piece of code many times. There are various built-in functions in PHP. A function will be executed by a call to the function. Following are...
3 minutes read.
PHP array_chunk() Function
PHP array_chunk() Function The array_chunk() function in PHP is used to split an array into chunks where the last chunk may contain less than size elements. Syntax array_chunk ( array $array , int $size [, bool $preserve_keys ]...
1 minute read.
PHP money_format() Function
PHP money_format() Function The money_format() function in PHP formats a number as a currency string and returns a formatted version of number. Syntax money_format ( string $format , float $number ) Parameter format(required)- This parameter specifies the string to be formatted and how to format the...
1 minute read.
PHP array_diff_assoc() Function
PHP array_diff_assoc() Function The array_diff_assoc() Function in PHP compares the difference of arrays and returns an array containing all the values from array1 that are not present in any of the other arrays. Syntax array_diff_assoc ( array $array1 , array $array2 [, array $... ] ) Parameter array1(required)- This parameter signifies...
1 minute read.
PHP Include Function
PHP Include( ) The PHP include() statement holds all the code/text that liesin the defined file and paste it into the file that uses the "include" statement. With the help of include...
3 minutes read.
PHP array_intersect_uassoc() function
The array_intersect_uassoc () function in PHP is used to compute the intersection of arrays with the help of an additional index check, comparing indexes by a callable function. It returns an array containing...
1 minute read.
PHP is_bool() Function
The is_bool() Function in PHP is used to find whether a variable is a Boolean or not. It returns a Boolean value true if the parameter var is a Boolean else it returns...
1 minute read.
PHP htmlspecialchars_decode() Function
PHP htmlspecialchars_decode() Function The htmlspecialchars_decode() function in PHP convert some predefined HTML entities to characters. The some predefined HTML entities that will be decoded are as follows: & OR & (ampersand)" OR " (double quote)'...
2 minutes read.
PHP shuffle() Function
PHP shuffle() Function The shuffle() function in PHP shuffles an array in a random array. Syntax shuffle ( array &$array ) Parameter array(required)- This parameter represents the input array. Return This parameter returns a Boolean value TRUE on success or FALSE on failure. Example 1 Output Original Array: Array ...
1 minute read.
PHP htmlspecialchars() Function
PHP htmlspecialchars() Function The htmlspecialchars() function in PHP converts some special predefined characters to HTML entities. The special predefined characters are as follows: & (ampersand) OR &" (double quote) OR "' (single quote) OR '<...
2 minutes read.
PHP list() Function
PHP list() Function The list() function in PHP sorts an array by key while maintaining the keys. Syntax list ( mixed $var1 [, mixed $... ] ) Parameter var1(required)- This parameter accepts variables separated by spaces. …(optional)- This parameter accepts a list of variables separated...
1 minute read.
PHP strspn() Function
PHP strspn() Function The strspn() function of PHP finds the length of the initial segment of string that contains only characters from the mask parameter. Syntax strspn(string$subject,string$mask[,int$start[,int$length]] ) Parameter subject(required)- This parameter represents the input string. mask(required)- This parameter specifies the characters to find. start (optional)- It signifies the position in the string to start...
1 minute read.
PHP $ and $$ Variables
PHP $var variable is a normal variable that stores any value. PHP $$var variable is a reference variable that stores the value of$var inside it. Let us take an example. Example 1 <?php $x =...
1 minute read.
PHP unserialize() Function
PHP unserialize() Function The unserialize() function in PHP takes a single serialized variable and converts it back into a PHP value. Syntax unserialize ( string $str [, array $options ] ) Parameter value(required)- This parameter represents the serialized string. options(optional)- This parameter signifies any options to be...
1 minute read.
PHP array_diff() Function
The array_diff () function in PHP compares array1 against other specified arrays and returns the values in array1 that are not present in any of the other arrays. Syntax array_diff(array$array1,array$array2[,array$...] ) Parameter array1(required)- This parameter signifies the input array to...
1 minute read.
PHP Operator
PHP Operator is used to perform operations on variable and values. Following are the types of Operator: PHP Arithmetic Operator PHP Arithmetic operator is used for arithmetical operations, such as addition, subtraction, multiplication...
2 minutes read.
PHP strstr() Function
PHP strstr() Function The strstr() function in PHP finds the first occurrence of a string. It returns part of the parameter haystack string starting from and including the first occurrence of needle to the end of the haystack parameter. This function is case-sensitive. Syntax strstr ( string $haystack , mixed $needle [, bool $before_needle] ) Parameter haystack(required)-...
2 minutes read.
PHP array_diff_ukey() Function
The array_diff_ukey() function in PHP compares the keys from array1 against the keys from array2 and returns the difference containing all the entries from array1 that are not present in any of the other arrays. Syntax array_diff_ukey ( array $array1 , array $array2 [, array $... ], callable $key_compare_func ) Parameter array1(required)- This parameter signifies the...
1 minute read.

