PHP code example of technically-php / rack-utils-http-query

1. Go to this page and download the library: Download technically-php/rack-utils-http-query library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

technically-php / rack-utils-http-query example snippets

 php
$vars = ['fruits' => ['apple', 'banana', 'orange']];
$query_string = \TechnicallyPhp\RackUtilsHttpQuery::build($vars);
var_dump($query_string); 
// will output: "fruits[]=apple&fruits[]=banana&fruits[]=orange"
 php
$vars = ['fruits' => ['apple', 'banana', 'orange']];
$query_string = http_build_query($vars);
var_dump($query_string); 
// will output: "fruits[0]=apple&fruits[1]=banana&fruits[2]=orange"