PHP code example of drupol / phpermutations
1. Go to this page and download the library: Download drupol/phpermutations 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/ */
drupol / phpermutations example snippets
// Create the object
$permutations = new \drupol\phpermutations\Generators\Permutations([1,2,3,4,5], 3);
// Use a foreach loop.
foreach ($permutations->generator() as $permutation) {// do stuff}
// Or get the whole array at once.
$permutations->toArray();