<?
$cards = array("ah", "ac", "ad", "as",
				"2h", "2c", "2d", "2s",
				"3h", "3c", "3d", "3s",
				"4h", "4c", "4d", "4s",
				"5h", "5c", "5d", "5s",
				"6h", "6c", "6d", "6s",
				"7h", "7c", "7d", "7s",
				"8h", "8c", "8d", "8s",
				"9h", "9c", "9d", "9s",
				"th", "tc", "td", "ts",
				"jh", "jc", "jd", "js",
				"qh", "qc", "qd", "qs",
				"kh", "kc", "kd", "ks");
				
srand(time());
for($i = 0; $i < 52; $i++) {
	$count = count($cards);
	$random = (rand() % $count);
		if($cards[$random] == "") {
			$i--;
		}
		else {
			$deck[] = $cards[$random];
		$cards[$random] = "";
		}
 }

srand(time());
$starting_point = (rand() % 51);
print("<p>Starting point for cut cards is: $starting_point</p>");

// display shuffled cards
for ($index = 0; $index < 52; $index++) { 
	if ($starting_point == 52) { 
		$starting_point = 0;
	}
	print("Uncut Point: <strong>$deck[$index]</strong> ");
	print("Starting Point: <strong>$deck[$starting_point]</strong><br>");
	$starting_point++; 
}
/**
 * Changes introduced
 *
 *  - Removed the "blah" on line 43 since this was not a valid function or even variable and the use of the function was not being assigned anywhere.
 *  - Stardardized bracket placement on lines: 18, 22, 26
 *  - Fixed indenting on lines 38-41
 *  - added spaces padding the % symbols on lines 20, 33
 *  - Changed the one line block comment on line 36 to a single line comment
 *  - Changed all indenting to tabs
 * I have had issues getting this work with my local XAMPP but I copied it over to my dedicated server http://cazzar.net/demo.php and the PHP interpreter worked the version is:
 *	PHP 5.4.9-4ubuntu2.1 (cli) (built: Jun 11 2013 13:08:51)
 *	Copyright (c) 1997-2012 The PHP Group
 *	Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
 *
 */
?> 