样本数组:
$player = array("lawrence","joey","jason","joel","bianca","paulo","albert");
我想将一个数组与其自身匹配,以便它从自身获取一个值而不会得到一个重复的值:
"lawrence" => "lawrence"; //must not contain itself
"joey" => "lawrence"; //must not assign value already assigned to that value
简而言之:它就像一个 交换礼物算法