document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("<h2>random_shuffle.php <\/h2>\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\">1\n");
document.write("2\n");
document.write("3\n");
document.write("4\n");
document.write("5\n");
document.write("6\n");
document.write("7\n");
document.write("8\n");
document.write("9\n");
document.write("10\n");
document.write("11\n");
document.write("12\n");
document.write("13\n");
document.write("14\n");
document.write("15\n");
document.write("16\n");
document.write("17\n");
document.write("18\n");
document.write("19\n");
document.write("20\n");
document.write("21\n");
document.write("22\n");
document.write("23\n");
document.write("24\n");
document.write("25\n");
document.write("<\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"><pre class=\"sunburst\">public function randomShuffleArray($dirty_array)\n");
document.write("{\n");
document.write("	if(!is_array($dirty_array))\n");
document.write("	{\n");
document.write("		die(\'No Array Provided\');\n");
document.write("	}else {\n");
document.write("		$size_of = count($dirty_array); //find the size of the array being sent to us\n");
document.write("		$return_array = array(); //create new array to return the newly shuffled array in\n");
document.write("		$rand_array = array(); // this is where we are going to put out new shuffle keys\n");
document.write("		// build our random number array\n");
document.write("		for($j=0;$j&lt;$size_of;$j++)\n");
document.write("		{\n");
document.write("			$rand_array[] = $j;\n");
document.write("		}\n");
document.write("		//now shuffle that order for our new keys\n");
document.write("		shuffle($rand_array);\n");
document.write("		//lets build our new assoc array\n");
document.write("		for($i=0;$i&lt;$size_of;$i++)\n");
document.write("		{\n");
document.write("			$return_array[$i] = $dirty_array[$rand_array[$i]];\n");
document.write("		}\n");
document.write("	}\n");
document.write("			\n");
document.write("	return $return_array;\n");
document.write("}\n");
document.write("<\/pre><\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/460852.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/460852\">Pastie #460852<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");
