PHP Variable Interpolation Example

Variable interpolation is adding variables in between a string data. PHP will parse the interpolated variables and replace the variable with its value while processing the string data. The variable parsing is allowed with the string data…

PHP String Concatenation Example

If we have enough familiarity with PHP inbuilt string and array functions, then, it will more helpful while doing code on PHP. In this series, we have seen some of such functions already, like, trimming, PHP functions for string case…

PHP String Replace Example

We have already seen many of PHP string functions with this blog, like implode/explode, string extract, split and etc. But, it is never ending process of learning about PHP Strings and Arrays. Since in that much volume of PHP core…

PHP Escape Sequences Example

PHP escape sequences are interpolated into strings, enclosed by single/double quotations or heredoc syntax. As its name, it is for escaping characters from being parsed as it is, literally. Escape sequences are started with escaping…

PHP isset vs empty vs is_null

PHP has multiple functions used to check PHP variables with respect to their initialized values. These functions are, isset() is to check if a variable is set with a value. empty() is to check if a given variable is empty. The…

PHP htmlentities() Example

Generally, character encoding is done in various ways in PHP which provides many functions to perform these conversions, onto a given input string, from one form to another. For example, PHP urlencode()/decode() is used to convert the…

PHP String Extract Example

Among enormous amount of PHP functions, the string functions are more in number and very popular and heavily utilized. So, the operations made upon string input like string concatenation, implode/explode, calculating string length and etc…

PHP Case Conversion Example

In PHP, string related functions are most popular and widely used while programming. Among them, some set predefined string functions are used for working with string cases. These functions are used to convert the string case from one…

PHP Trim Example

Trimming in PHP is used to clean up the unwanted white spaces of a string. There is no guarantee for the user entered input will always be perfect. Rather, the users can enter their strings with some unwanted space by mistake. Before…

PHP array_intersect Example

PHP array_intersect() function is used to find intersection between arrays. This function can accept multiple arguments to compare. After comparison, this function returns an array of intersecting elements that are commonly available in…