Encode Decode JSON In PHP

JSON stands for JavaScript Object Notation. JSON is an open standard data format used to transfer data quickly and easily. In PHP, there is an in-built function to handle JSON operations like encode and decode. Objects or arrays can easily be parsed into JSON using those functions. Then we can transfer JSON sting over HTTP/HTTPS

Learn More

How to Handle CSV Files in PHP?

Character Separated Values(CSV) or Comma Separated Values is a file type containing plain text content with a comma or a character as separators. PHP provides built-in functionality to read CSV files. Here, we will learn to use CSV data in our application using multiple methods. The first method will read data from a file while

Learn More

Add or Minus Years from Carbon Date in Laravel

The best part of Laravel is it has a variety of open-source plugins available. One of them is Carbon. Carbon is a date-time package for Laravel or any other PHP-based framework. In this blog, we will see some practical examples to add or remove years from carbon date objects. Carbon provides a function for adding

Learn More

PHP File Download and Upload

Nowadays, File upload and download functionality is almost mandatory. PHP provides simple and easy ways to upload and download files. You can store these files in a public folder or local storage. In this tutorial, we will show you how you can upload files of various formats like .zip, .pdf, .docx, and .ppt, as well

Learn More

Generate Random String in PHP

In this example, we will generate a random string using PHP. We will use multiple methods to create random strings in PHP. There are three different functions for generating random numbers in PHP which accept min and max values and generate a random number from that range. PHP doesn’t have any in-built functions to generate

Learn More

Generate QR Code In PHP

For any developer knowing how to generate dynamic QR codes and allow users to download them as image files is an important task. QR codes are playing an important role in many industries like online payments, eCommerce, or ticket booking. Nowadays sharing QR codes on visiting cards is also very common. The QR code stores

Learn More

Check File Exists or not Using PHP

While working with file download functionality with the database, we commonly face an error that says file not found. So if we add functionality to check file exists or not before the actual searching file then we can provide a better user experience. PHP provides many built-in functions to handle file operations easily. Some of

Learn More