I am unsure if it actually is what you want (due to your comment) but to answer the question for future visitors:
<?php
function jumbleUrl($url) {
// $jumbledUrls will be our result array
$jumbledUrls = array();
// first strip and backup the domain and protocol
$protocol = substr($url,0,stripos($url,'//')+2);
$urlRemaining = substr($url,strlen($protocol));
$domain = substr($urlRemaining,0,stripos($urlRemaining,'/')+1);
$urlRemaining = trim(substr($urlRemaining,strlen($domain)),'/');
// create array of remaining url parts
$jumbleParts = explode('/',$urlRemaining);
/**
* now we use our jumbleable parts as numbers in our own number system and
* count thru all possibilities. See Text below.
*/
$jumblePartsCount = count($jumbleParts);
$possibilities = pow($jumblePartsCount,$jumblePartsCount);
for ($i = 0; $i <= $possibilities; $i++) {
// now we have to find the combination representing our number.
// basically we have to convet our base 10 number to our base $possibilities number
// Luckily php has a function for that:
$possibilityNr = base_convert ( $i , 10 , count($jumbleParts) );
// Now we take each "digit" of our possibilites Nr and take the
// jumbleablePart it represents
$jumbledUrl = '';
/**
* assuming you do not want jumbled urls like example.org/peter/peter/frank we
* prevent parts from occuring more than once in an url.
*/
$doublesPreventer = array();
$doublesOccured = false;
for ($j=0;$j < strlen($possibilityNr);$j++) {
$digit = intval(substr($possibilityNr,$j,1));
if(in_array($digit,$doublesPreventer)) {
$doublesOccured = true;
break;
}
else {
$jumbledUrl .= $jumbleParts[$digit].'/';
$doublesPreventer[] = $digit;
}
}
if(!$doublesOccured) {
// Now we have a jumbled url and store it to our array of jumbled urls
$jumbledUrls[] = $protocol . $domain . $jumbledUrl;
}
}
return $jumbledUrls;
}
$url = 'http://fujifilm.in/en/products/consumer_products/digital_cameras/x/fujifilm_x_t1/';
$jumbledUrls = jumbleUrl($url);
var_dump($jumbledUrls);
See code running here (might not work due to ideone memory restrictions).
If you see your jumbleable parts as numbers you can easily calculate how many possibilietes there are. If you have 10 parts, your numeric system stays the same and you have a 10 digit long number representing your possibilities: 9,999.999.999 + 1 possibilities right?
If you have less, let's say like in your example 6 parts, you have 6^6 possibilities (46656).
Read up on ...
... to understand how it works.
WARNING: It only works if you do not have more than 36 slashes (jumbleable parts) due to restrictions in the PHP base_convert method.