Nov 26, 2013, by admin
Here in this post, we’ll discuss how to convert or parse a URL into PHP associative array containing any of the various components of the URL that are present. For accomplishing this, we’ll use PHP build in function parse_url.
Parse an URL query string into PHP array
First let us take a look at the following URL query string:
Now let’s take a look at how we can parse above URL query string into PHP array using PHP built in function parse_url:
Result array: