<?php 

function muestra($palabra1,$palabra2,$palabra3) {
 	$frase = "";
 	$valor_azar = rand(1,6); //Hay 6 ccombinaciones posibles
  	if ($valor_azar == 1) {
		$frase = $palabra1." ".$palabra2." ".$palabra3;
	}
	else if ($valor_azar == 2) {
		$frase = $palabra1." ".$palabra3." ".$palabra2;
	}
	else if ($valor_azar == 3) {
		$frase = $palabra2." ".$palabra1." ".$palabra3;
	}
	else if ($valor_azar == 4) {
		$frase = $palabra2." ".$palabra3." ".$palabra1;
	}
	else if ($valor_azar == 5) {
		$frase = $palabra3." ".$palabra1." ".$palabra2;
	}
	else if ($valor_azar == 6) {
		$frase = $palabra3." ".$palabra2." ".$palabra1;
	}
 	echo $frase;
}
$palabra1 = "Uno";
$palabra2 = "Dos";
$palabra3 = "Tres";
muestra($palabra1,$palabra2,$palabra3);


?>
