Browsing Category
PHP
Remove duplicate values from an array in PHP
You can use the PHP array_unique() function remove duplicate values from an array. If two or more array values are the same, the first appearance will be kept and the other will be removed.
array_unique() through we can get only unique…
Create A Dynamic Credit Card Expiration Year Dropdown Using PHP
In the below code there is a dynamic credit card expiration year dropdown that will take the current year along with next 10 years. So we don't need to update dropdown field every year.
<select name="expiry_year">…
How To Check Email Address Validation In PHP
In this article we will discuss how to check email address validation In PHP. we will verify the email address is in correct format or not.
Example #1 Check Email Address Validation with filter_var() function
In below example we are…
Most Useful PHP Snippets
Here we have some set of Useful PHP Snippets, which are useful for PHP Developers. That you can easily add in your projects and help you save your time.
Most Useful PHP Snippets
1) Check if a date today's date
$date =…
Install CakePHP 3 using Composer
In this tutorial we will guide you how to Install CakePHP 3 Using Composer step by step. CakePHP uses Composer, a dependency management tool, as the officially supported method for installation. Through Composer it's simple and easy to…
Generate Random Alphanumeric String with PHP
In this article, we will explain how to Generate Random Alphanumeric String with PHP. This is a simple function that allows you to generate random strings containing Letters and Numbers (alphanumeric) using PHP. The random strings can be…
How to Remove empty array elements in PHP
You can use the PHP array_filter() function remove empty array elements or values from an array in PHP. This will also remove blank, null, false, 0 (zero) values.
array_filter() function
The array_filter() function filters elements or…
PHP program to print Heart Star Pattern
In this article write a PHP program to print Heart Star Pattern using asterisk (*) symbol. We run for loop 10 times, in which you have two outer for loops which contains nested for loops to print Heart Star Pattern of stars as shown in the…