Posts from PHP

Calculate the execution time in PHP

By Faruque Ahamed Mollick

The execution time of the PHP script is the time taken for the script to be executed. Whenever we run the PHP code on the server, it takes some time to execute. It is possible to c.... Read More

Get common elements from two different arrays in PHP

By Faruque Ahamed Mollick

Suppose we have two PHP array and each of them contains some elements. Now we want to get common elements or values from those two arrays with PHP. Then how we can do it? Well, thi.... Read More

Set default timezone in PHP | date_default_timezone_set()

By Faruque Ahamed Mollick

Do you need to change the default timezone for all the date and time functions of PHP? If you are looking for something for this, then you are at the place where you will get the s.... Read More

Sort array values alphabetically in PHP

By Faruque Ahamed Mollick

This tutorial is related to PHP array and may be helpful for many of you. Here I am going to show you how you can easily sort a PHP array values alphabetically with the required co.... Read More

Array to JSON conversion in PHP using json_encode

By Faruque Ahamed Mollick

If you are reading this article, then most probably you already know about JSON and PHP array. Now I am going to show you how you can convert any PHP array into JSON formatted stri.... Read More

Get the ratio of two numbers in PHP

By Faruque Ahamed Mollick

In this article, I am going to guide you to show how to get the ratio of two numbers in PHP. Follow me to see how we can perform this useful task. I hope, you already know what is .... Read More

Check if a variable is an array or not in PHP

By Faruque Ahamed Mollick

We often need to store an array in a variable. So here in this post, I am going to let you know how you can check whether a variable is an array or not in PHP. So let’s conti.... Read More

Encrypt and Decrypt a String in PHP

By Faruque Ahamed Mollick

Encryption and decryption of data is a technique used for security purposes. This technique widely used to keep confidential messages secret and only readable by the receiver of th.... Read More