Created
August 31, 2019 17:59
-
-
Save biswajitpaul01/f83e0128b55be189615566e0022ec51d to your computer and use it in GitHub Desktop.
Extract query parameters from url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$href = 'https://in.pinterest.com/bhagyashrijadhav51/happy/?utm_campaign=rdboards&e_t=5c7cb45aadb34115ba86ab4531b61a23&utm_content=733664664235398280&utm_source=31&utm_term=3&utm_medium=2004'; | |
$query_str = parse_url($href, PHP_URL_QUERY); | |
parse_str($query_str, $query_params); | |
echo $query_params['utm_campaign']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment