codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php $strs = Array("some", "thing", "here", "new"); $poss = Array(1, 2); $new = Array(); for($i = 0; $i < pow(count($strs), count($poss)); $i++) { for($j = 0; $j < count($strs); $j++) { $new[$i] = $strs[($i%count($strs))] . " " . $strs[$j]; } } print_r($new); ?>
Private
[
?
]
Run code
Submit