You might have seen function in famous frameworks or third-party libraries and wondering what this function does, you are in the right place. The magic method triggered when the object is being called as a function. The method can accept any number of parameters and is able to return mixed data types. To get triggered…Continue Reading
PHP
Deleting an element from an array in PHP
There are two different ways to delete an element from arrays in PHP. Method #1 unset() Keep a note on this that, index won’t change after you use to delete an element from an array. But you can use just after to re-index the keys. $array = [ 0 => “Pen”, 1 => “Paper”, 3…Continue Reading
5+ Dating Application Script in PHP
1) QuickDate – The Ultimate PHP Dating Platform QuickDate is a social dating script written in PHP, and it gives you a complete configurable dating application without doing much coding. It’s very fast, secure, and regularly updated. Features 1) Admin Dashboard 2) High Performance 3) Filters to search 4) Premium feautre option to unlock more…Continue Reading
PHP Variable Interpolation
Variable interpolation is adding a variable inside a string in PHP. The main thing to note is, PHP interpolation works only in double-quoted strings and the heredoc syntax. If you use interpolation inside a string with single quotes, it will just print back the same variable. In fact, the single-quoted string can not parse the interpolated…Continue Reading
Laravel 8 – Ajax File Upload with Progress Bar
Today’s tutorial I will show you how to work on ajax file upload with progress bar in Laravel. File uploads are pretty much everywhere in today’s web/mobile applications. For example, in Facebook profile users want to add a photo, or in twitter handle users want to show an event picture etc. Let’s start with create…Continue Reading
Show Thumbnail Image from YouTube Video URL using PHP
Thumbnail is the preview of an image, of a group of entities such as a movie, image gallery etc. The advantages of the thumbnail is, reduced size of image, when compared to the original image used to represent something. A website or app that has thumbnails will have faster page loads rather than showing the…Continue Reading
How to Force Download File from Remote Server in PHP
Usually we download the files hosted in same server using php, but in this tutorial we are showing how to download a file hosted in remote server.
How to get GMT date time in Magento 2?
Magento 2 usually saves the time in GMT in database, but display on admin or frontend will be based on the selected timezone. Use the below code to get the time with GMT timezone from Magento 2 code. Magento comes with DateTime php class, Magento\Framework\Stdlib\DateTime\DateTime is used for Forms GMT date. <?php public function __construct(…Continue Reading
How to create a Controller in Magento 2?
Controller is one of the most important thing in MVC Frameworks in general, so the same in Magento 2 as well. It’s very duty is to receive the request, process and render to user. In Magento 1 there was one controller and it accommodates all the CRUD routes or other relevant routes. But in Magento…Continue Reading
How To Get The Collection Of Records From A Custom Module In Magento 2?
If you are working on a custom Magento 2 module, and wondering how to get the collection of records from your custom database table, this article is for you. This is very common that your Magento 2 website needs more database tables than what Magento shipped with. So in a listing page such as blog…Continue Reading
Removing whitespace characters in PHP
Today’s guide we are talking about the white spaces in strings and how to remove white spaces in PHP. The normal way to remove white space is using str_replace. Remove whitespaces using str_replace str_replace is very simple and powerful for removing whitespaces. Use the below script to see this in action. <?php $str = “he…Continue Reading
Disable versions in Magento 2
By default Magento 2 static urls have a version string attached to it. For example, if you take the view source of the page, you will see urls contains the following string -version1490119662.
Installing Composer on Mac OSX
Composer is a dependency management tool for php projects. By using composer, you can just declare the dependecy in your project and composer will handle/download this for you.
How To Create A Custom Taxonomy In WordPress
Today’s tutorial we are showing how to create a custom taxonomy in WordPress. After WordPress 3 this feature is included in the core, so we just need to use the function with some params. The core developers created function to handle the heavy lifting for us. Why Custom Taxonomies? As your system/website grows you feel…Continue Reading
Drag and Drop File Upload using DropzoneJS and PHP
Today’s article, we will show you how to drag and drop an image file using dropzonejs and PHP. Dropzonejs library provides us options for multiple uploads feature. For this we have one index.php, dropzone repo, and upload.php files. We use bootstrap css to help us to sort the stylesheets. Download the dropzonejs by clicking here…Continue Reading
Using PHP glob() Function to Find Files in a Directory
It is very common that you may want to list out all the files in a directory that contains several levels of sub directories. So consider the below folder structure media sample.jpg foo.txt get.php PHP has a built in function called which comes handy while handling files and directories. Best thing about this function is…Continue Reading
Hierarchical Tree view Category Example in Laravel
For most of the projects you work on in PHP or in any language, there you have to encounter categories and subcategories. When comes to categories, the tree view is the best listing method that we can use in our web apps. In this article, we are showing you how to create a Laravel tree…Continue Reading
PHP str_replace() Function
replaces all occurrences of search string with a replacement string. Syntax str_replace(find, replace, string, count) find(required) – It specifies the value to find. replace(required) – It specifies the value to replace the value in find. string(required) – it specifies the string to be searched. count(optional) – it is the variable that counts the number of…Continue Reading
How to Copy a File From One Folder to Another With PHP?
Today’s article, we will show you how to copy a file from folder to another by using PHP. For this we use default PHP function . Basically, it has two parameters to work a copy function. This file will overwrite if the file already exists in the folder. See the below example function. <?php $file…Continue Reading
Ajax Image Upload using PHP and jQuery
Today’s tutorial, we are showing uploading an image using ajax and saving into a folder in server. In the past, we have seen many tutorials that explains how to upload an image using html and PHP. This tutorial too use PHP to upload the image, but uses the asynchronous techniques of Javascript via jQuery. This…Continue Reading
20+ Best Magento Website Templates Free & Premium

Ultimo – Fluid Responsive Magento Theme Demo Download/More Info Porto | Ultimate Responsive Magento Theme Demo Download/More Info Shopper – Magento Theme, Responsive & Retina Ready Demo Download/More Info Fortis – Responsive Magento Theme Demo Download/More Info Fastest Demo Download/More Info Market – Premium Responsive Magento 2 Demo Download/More Info Claue Demo Download/More Info Black&White Demo Download/More Info Everything | Multipurpose Responsive Magento…Continue Reading
Magento 1: Assign/ Remove category from a product.
This tutorial will show how to assign or remove a category from a product in Magento 1. I have used the standalone script, but you can use this in any module. Assign a category to product $productId = 2000; $categoryId = 200; Mage::getSingleton(‘catalog/category_api’)->assignProduct($categoryId,$productId);Remove a category to product $productId = 2000; $categoryId = 200; Mage::getSingleton(‘catalog/category_api’)->removeProduct($categoryId,$productId);
Magento1 – Remove existing Media Gallery and Add New One at same loop
Below script helps you to remove existing images from the media gallery and add a new one at the same time to avoid duplicates in Magento 1. The following script will be very helpful while importing images bulk to Magento website.
Laravel Auth: Login with username instead of Email
Setup Project Update the .env file with your desired database details. Run the following command to create the scaffold for authentication pages. Next, we want to add our new field, username to our database migration structure. Open this file database/migrations/create_users_table.php. Add the username field in the up() function after the name field. So the final…Continue Reading
MySQL CONCAT() Function
If you want to join several strings together in MySQL you can use the CONCAT function. Syntax Example
How to Convert PNG to JPG with compression in PHP?
Use the below snippet to Convert PNG to JPG with compression in PHP.
Laravel Image Intervention Tutorial With Example
How to use Intervention Image in Laravel 5 with Example. In this tutorial we will show how to use Intervention image manipulation package in Laravel. Basically we use this package to upload an image and resize it in the server. Common use cases are upload users photo or upload a product image etc. Laravel Image…Continue Reading
How to get all days and date for a given month?
This is to get all days and date for choosen month. Just follow the code to display all the dates for a month. $month = “07”; $year = “2018”; $startDate = “01-“.$month.”-“.$year; $startTime = strtotime($startDate); $endTime = strtotime(“+1 month”, $startTime); for($i=$startTime; $i<$endTime; $i+=86400) { $list[] = date(‘Y-m-d-D’, $i); } print_r($list);
Get YouTube Video Thumbnail URL using PHP

YouTube is the world’s favorite video search engine. It’s very common now people use YouTube video in their websites/blog. Today’s tutorial we are demonstrating how to fetch YouTube video thumbnail using PHP. Basically this simple PHP script fetch YouTube thumbnail image from a full YouTube video URL. Get Thumbnail Image URL from YouTube Embed Code…Continue Reading
Sending emails through Mailgun using Codeigniter
This tutorial provides step by step guide to send email using mailgun SMTP using Codeigniter. Mailgun is a powerful API that enables send,receive and track emails. Step #1 Let’s create a config.php file in the config/email.php and define $config array in it. You do not need to load this file manually, as the Codeigniter will…Continue Reading