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

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