phabloraylan/add-get-param-to-url

Manipulate a url string by adding GET parameters.

1.0.0 2019-08-14 04:04 UTC

This package is auto-updated.

Last update: 2024-04-14 15:29:43 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;