send array

PHP Sending Array to URL using JSON Encode/Decode

This tutorial features a way to send array to url using json encode/decode. Of course, there are a number of ways to send array to url but for me, I found this efficient when it comes to sending arrays. Also, I've included three ways to send to url which are via href, php header and script location. So, let's get started.

Creating Sample Array

First step is to create our sample array with the 3 ways to send to url.