Posts by Ujwal Kumar Sahoo

Author Biographical Info:

Ways to exit from a foreach loop in PHP

By Ujwal Kumar Sahoo

In this article, we will focus on the different exit methods from the foreach loop in PHP. Before that, we will discuss what exactly a foreach loop is. What is a foreach loop in PH.... Read More

Convert an image to grayscale using PHP

Convert an image to grayscale using PHP

By Ujwal Kumar Sahoo | July 5, 2019

In this article, we will discuss different methods to convert an image into a grayscale image in PHP. We will discuss both the predefined method as well as the user-defined methods. Convert an image to grayscale in PHP using predefined methods PHP introduced predefined effects for image manipulation. Example:- Using imagefilter() methods,  such as-IMG_FILTER_GRAYSCALE, IMG_FI Read More

Find the distance between two places using latitude and longitude in PHP

By Ujwal Kumar Sahoo

In this article, we will see how to calculate the distance between two places or points using latitude and longitude in PHP. Basically, the distance is calculated using latitude an.... Read More

Check internet connection in PHP

By Ujwal Kumar Sahoo

In this article, we will discuss various methods in PHP to check the internet is present or not. We are going to create the scripts using predefined as well as user-defined methods.... Read More

Compress and create a zip file in PHP

By Ujwal Kumar Sahoo

In this article, we will discuss how to create a zip file and how to compress data items in it. Firstly, we have to understand what exactly a zip file is. What is a zip file? A zi.... Read More

How to generate random string in PHP?

By Ujwal Kumar Sahoo

In this article, we will cover how to generate random string in PHP and it’s application in various fields. Create random strings for a fixed length In this section, we will .... Read More

What are Variable Variables in PHP?

By Ujwal Kumar Sahoo

In this article, we will learn how PHP dynamically declares a variable. That is reference variable also known as Variable Variables in PHP. PHP allows the programmer to create and .... Read More

How to read and write in files using PHP

By Ujwal Kumar Sahoo

In this article, we will learn how to read and write in the file. There are 3 simple steps to do file operation : Open a file in the proper mode. Read/write contents in file. Close.... Read More