Download Image from URL in PHP

In this post, I share simple code to download and view images from URLs in PHP. HTML Create a simple HTML form PHP We have used file_get_contents() method here. file_get_contents() is the preferred way to read the contents of a file into a string. It will use memory mapping techniques if supported by your OS to … Read more

Categories PHP

How Pass PHP Array to Javascript

How Pass PHP Array to Javascript

The PHP array can be used in the javascript function in many ways. But today in this blog we will use the main two ways. The first one is json_encode() and the second one is most common PHP implode() function. Method 1 : json_encode() First, define an array into PHP. json_encode() returns the JSON representation … Read more

How to Pass PHP Variable to JavaScript ?

Hello developer In this blog we will see how to access or use PHP variables in to Javascript. Sometime we need to just pass a PHP variable to Javascript on same page. So here simply set a variable value in PHP and we will use in show a alert in Javascript. HTML code In the … Read more

Compress Image size while Uploading in PHP

In this tutorial, we are going to learn about how to compress image size while uploading with PHP First, create a new table Step 1:- Create a compress_image table in the database. Step 2:- Create a connection to the database in the PHP file. The mysqli_connect() function opens a new connection to the MySQL server. Syntax : … Read more

Categories PHP

Modal delete confirmation Laravel

In this post, we learn how to show a modal delete confirmation in Laravel. When the users try to delete some data or row from the table a modal popup for confirmation. with two buttons delete or cancel. Modal delete confirmation Laravel create a delete button which is the passed id of the item which we want to … Read more

Show and Edit Dynamic Data In Modal Popup PHP

This blog post, we learn how to show and edit Dynamic data in modal. We perform this task using the data attribute and Jquery. Sometimes We need to Edit data on the same page using modal, without open data on another page. So in this blog post, we learn how to that. To achieve this … Read more

What is Laravel Seeder and how to use seeder in Laravel?

What is Laravel Seeder

In this blog post, we know about laravel seeder and how to create an id and use it. Laravel seeder uses to insert multiple rows of data into the database by one command. In this blog post, we learn how to create a Laravel seeder and run a specific seeder class or multiple seeder class … Read more

Import Large CSV file into MySQL PHP [load data infile mysql]

Import Large CSV file into MySQL

In this blog, we Import a Large CSV file into MySQL by PHP using load data Infile MySQL. some time we required to upload large files such as up to 100MB. So this is a very simple load data in file method to import a large CSV file data into the database. I use here PHP language … Read more