phabloraylan/add-get-param-to-url

Manipulate a url string by adding GET parameters.

1.0.0 2019-08-14 04:04 UTC

README

Manipulate a url string by adding GET parameters.

Installation

$ composer require phabloraylan/add-get-param-to-url

Using

  
  use AddGetParamToUrl\URL;
  
  $url = 'http://localhost';
  
  $params = [
      'name1' => 'value1',
      'name2' => 'value2',
  ];
  
  $r_url = URL::addGetParamToUrl($url, $params);
        
  echo $r_url;