In this article, we will see how to extract the filename extension in PHP, along with understanding their implementation through the examples. There are a few different ways to extract the extension from a filename with PHP, which is given below:...
The number_format() function is an inbuilt function in PHP which is used to format a number with grouped thousands. It returns the formatted number on success otherwise it gives E_WARNING on failure....
Given a date and the task is to print the last day of the month. We will use date() and strtotime() function to get the last day of the month....
We already have learnt about file inclusion in PHP in the article PHP | (Include and Require). We have discussed about include() and require() functions for file inclusion in our previous article. In this article we will discuss about two more yet useful functions in PHP for file inclusion: include_once() and require_once() functions....
The invert() function is an inbuilt function that is used to apply a filter to the image to set the invert of the color of the sample image....
In this article, we are going to discuss how to prevent SQL injection in PHP. The prerequisite of this topic is that you are having XAMPP in your computer....
In JavaScript, slice() and splice() are array methods with distinct purposes. `slice()` creates a new array containing selected elements from the original, while `splice()` modifies the original array by adding, removing, or replacing elements....
The date_diff() is an inbuilt function in PHP which is used to calculate the difference between two dates. This function returns a DateInterval object on the success and returns FALSE on failure....
Underscore.js _.uniq() function returns the array which does not contain duplicate elements. The first occurrence of the element is included in the resultant array. The operation of checking whether the array is duplicate or not. It is done by the ‘===’ operation....
The empty() function is an inbuilt function in PHP that is used to check whether a variable is empty or not....
The mysqli_real_escape_string() function is an inbuilt function in PHP which is used to escape all special characters for use in an SQL query. It is used before inserting a string in a database, as it removes any special characters that may interfere with the query operations. When simple strings are used, there are chances that special characters like backslashes and apostrophes are included in them (especially when they are getting data directly from a form where such data is entered). These are considered to be part of the query string and interfere with its normal functioning....
Underscore.js _.filter() is used to check which elements in the passed array satisfy the condition. It will form a new array of all those elements that satisfy the condition passed from the array. It is mostly used when needed to find certain elements from a large array....