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.
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.
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.
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.
Here we’ll provide the simplest way to add days, minutes, hours and seconds to time using PHP. In PHP, using date() and strtotime() function you can easily increase or decrease time.
When you are working with multiple files upload in PHP, it is necessary to increase the files upload limit. If you want to upload more than 20 files, you should need to modify the max_file_uploads variable value in php.ini file.
Are you concerned about the profile picture size? at the time of implementing login with facebook in PHP. We’ll show you the simple way to get large size profile picture in Facebook PHP SDK.
In many cases you need to enable cURL in PHP. Here we’ll provide the easy way to enable cURL in PHP. You only need to modify the php.ini file for enabling cURL in PHP
An Easy way to add days to the current date or desired date using PHP. Add 5 days to date using the date() function in PHP.