PHP code example of elminson / permutations

1. Go to this page and download the library: Download elminson/permutations 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/ */

    

elminson / permutations example snippets


    // Customizable features for a smartphone
    $colors = ['Black', 'White'];
    $storageCapacities = ['64GB', '128GB'];

    // Generating variations using Permutations::generate
    $actualVariations = Permutations::generate([$colors, $storageCapacities]);

        $ = ['AB', 'CD'];
		$array1 = ['EF', 'GH'];
		$permutationsExpected = [ ['AB', 'CD'], ['EF', 'GH'], ['AB', 'EF'], ['AB', 'GH'], ['CD', 'EF'], ['CD', 'GH']];
		$permutationsElements = Arr::permutations([$array, $array1], $