How to extract extension from a filename using PHP ?
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:...
read more
PHP number_format() Function
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....
read more
How to get last day of a month from date in PHP ?
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....
read more
PHP | include_once() and require_once()
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....
read more
CSS invert() Function
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....
read more
How to prevent SQL Injection in PHP ?
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....
read more
What is the difference between Array.slice() and Array.splice() in JavaScript ?
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....
read more
PHP | date_diff() Function
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....
read more
Underscore.js _.uniq() Function
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....
read more
Difference between isset() and empty() Functions
The empty() function is an inbuilt function in PHP that is used to check whether a variable is empty or not....
read more
PHP | mysqli_real_escape_string() Function
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....
read more
Underscore.js _.filter Function
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....
read more