diff --git a/Retos/Reto #36 - PERMUTACIONES [Media]/php/vandresca.php b/Retos/Reto #36 - PERMUTACIONES [Media]/php/vandresca.php new file mode 100644 index 0000000000..3f0e7b1900 --- /dev/null +++ b/Retos/Reto #36 - PERMUTACIONES [Media]/php/vandresca.php @@ -0,0 +1,37 @@ +$permutation) { + $permutations[] = $word[$i] . $permutation; + } + } + return $permutations; + } + + function printPermutations($word){ + $permutations = permutations($word); + foreach($permutations as $permutation){ + echo $permutation. " "; + } + echo "\n"; + } + + printPermutations("sol"); + printPermutations("mar"); + printPermutations("cabra"); + + ?>