Golf Courses in Zip Code

"; if ($rows==0){ //echo "No ".$type."(s) found in ".$county."
"; }else{ //echo $rows." ".$type."(s) found in ".$county."
"; } echo ""; $ratingImg = "Be the 1st to rate this course"; for ($num = 0; $num < $rows; $num++) { $count=$num; $featArr[$count]{$num."CourseName"}=mysql_result($result,$num,"CourseName"); $featArr[$count]{$num."City"}=mysql_result($result,$num,"City"); $featArr[$count]{$num."lat"}=mysql_result($result,$num,"lat"); $featArr[$count]{$num."longy"}=mysql_result($result,$num,"longy"); $featArr[$count]{$num."street1"}=mysql_result($result,$num,"street1"); $ID=mysql_result($result,$num,"ID"); $result_comments = mysql_query("SELECT Comment, AVG(rating) as rating_a FROM comments where id = '$ID' AND approved = 'Y' GROUP BY ID"); if ($myrow2 = mysql_fetch_array($result_comments)) { if ( $myrow2["rating_a"] <= 1) $ratingImg = ""; elseif ( $myrow2["rating_a"] > 1 && $myrow2["rating_a"] <= 1.7) $ratingImg = ""; elseif ( $myrow2["rating_a"] > 1.7 && $myrow2["rating_a"] <= 2.2) $ratingImg = ""; elseif ( $myrow2["rating_a"] > 2.2 && $myrow2["rating_a"] <= 2.7) $ratingImg = ""; elseif ( $myrow2["rating_a"] > 2.7 && $myrow2["rating_a"] <= 3.2) $ratingImg = ""; elseif ( $myrow2["rating_a"] > 3.2 && $myrow2["rating_a"] <= 3.7) $ratingImg = ""; elseif ( $myrow2["rating_a"] > 3.7 && $myrow2["rating_a"] <= 4.2) $ratingImg = ""; elseif ( $myrow2["rating_a"] > 4.2 && $myrow2["rating_a"] <= 4.6) $ratingImg = ""; elseif ( $myrow2["rating_a"] > 4.6) $ratingImg = ""; } if ($bgcolor == $rowcolor2) $bgcolor = $rowcolor1; else $bgcolor = $rowcolor2; echo ""; echo ""; echo ""; } echo "
Rating ?Golf Course NameAddressCity
".$ratingImg."".$featArr[$count]{$num."CourseName"}."".$featArr[$count]{$num."street1"}."".$featArr[$count]{$num."City"}."
"; //js array vars $name = "js_featArr"; $name2 = "js_realRows"; function phpArrayToJsArray($name,$array,$prePend='var ') { if (is_array($array)) { // Array recursion $result = $name.' = new Array();'."\n"; foreach ($array as $key => $value) { $result .= phpArrayToJsArray($name.'["'.$key.'"]',$value,''); } } else { // Base case of recursion $result = $name.' = "'.$array.'";'."\n"; } return $prePend.$result; } ?>

Interactive Map of Zip Code Golf Courses