How to Filter Multidimensional Array by Key Value in PHP


PHP array_filter() function filters elements of an array by a callback function and it can be used for many purposes. The array_filter() function provides a short and simple way to filter multidimensional array by key and value. Use array_filter() to filter values from multidimensional array similar to SQL LIKE using array_filter() function in PHP.


How to Increase File Upload Size in PHP


By default, PHP allows uploading maximum 2 MB file on the server. But you can change the maximum size of file upload as per your requirement. Using the PHP configuration file (php.ini), you can increase or decrease the file upload size in PHP.


How to Modify the PHP Configuration File on Ubuntu


The php.ini file is a default configuration file that read on PHP starts up. The PHP settings and configuration can be modified by the php.ini file. If you want to change the PHP settings on Ubuntu, php.ini file is an easy and most effective way to do it. Follow the steps to modify the PHP configuration file (php.ini) using the command line on Ubuntu.


How to Get Number of Days Between Two Dates in PHP


Are you want to calculate the difference between two dates in PHP? There are a simple way to get the number of days between two dates in PHP. Use date_create() and date_diff() function to get number of days between two dates in PHP.


How to Install PHP GD Support on Windows Server


The GD library is required to create and manipulate images in PHP. You need to enable GD library support for working with image functions in PHP. Here we’ll show you how to install GD library in PHP on Windows server. Follow the step-by-step instruction to install PHP GD library in XAMPP or WAMP server.


How to Filter Array by Value in PHP


PHP array_filter() function filters elements of an array using a callback function and returns the filtered array. Here we’ll provide a short PHP code snippets to filter elements of an array that contain a specific value. It will help you to filter an array based on particular condition.


How to Calculate Age from Date of Birth in PHP


Some web applications are needed to show the age of the user. In that case, you need to calculate the user age from date of birth. Use date(), date_create(), and date_diff() functions to calculate age from date of birth in PHP.


How to Get Domain Name from URL in PHP


Parse domain name from URL is used in many cases in the web project. In this short tutorial, we’ll provide a simple code snippet to get domain name from URL in PHP. Using our example script, you’ll be able to extract only the domain name from any type of URL.


How to validate a URL in PHP


Validating a URL at the time of receive user input by form is very important. Here we’ll provide the simple PHP code to validate a URL in PHP. Using filter_var() function with FILTER_VALIDATE_URL Filter, we can easily validates a URL in PHP.